Yoast / Yoast-SEO-for-TYPO3

Yoast SEO plugin for TYPO3
Other
51 stars 56 forks source link

Preview broken in TYPO3 9.5 #224

Closed nito-web closed 5 years ago

nito-web commented 6 years ago

Please give us a description of what happened.

I installed your Extension in a TYPO3 9.5 and filled data in title, description, og-... and twitter-... and its working perfect in the frontend.

But in the backend, the preview is allays showing This is an example title - edit by clicking here Slug preview:example.com/example-post/ Meta description preview:Please provide a meta description by editing the snippet below.

The Browser fires a GET Request to Request URL: http://domain.test/services?type=1480321830&uriToCheck=%252Fservices&cHash=2b9c4351cf6d145e369fe46f5f17c8b3 and gets a Status Code: 200 OK back, but in the Response Body is always a {"error":"Kon niet lezen"}

Logs

PHP message: PHP Warning: get_meta_tags(/services): failed to open stream: No such file or directory in /.../typo3conf/ext/yoast_seo/Classes/UserFunctions/SnippetPreview.php on line 16 ', referer: http://domain.test/typo3/index.php?route=%2Fweb%2Flayout%2F&token=885a9011f2a5dbe3a85fbada2c93062b607217c2&id=4

Technical info

haassie commented 6 years ago

Please check if #225 will fix this issue

nito-web commented 6 years ago

The error changed, now I get an error message instead of the preview:

We got an error 500 (Internal Server Error) when requesting /?type=1480321830&uriToCheck=%252F&cHash=fe186204612be6a51c8dd8722eae464e to analyse your content. Please check your javascript console for more information.

Logfiles

[Mon Oct 29 12:11:14.306799 2018] [proxy_fcgi:error] [pid 300:tid 123145400655872] [client 127.0.0.1:51136] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TYPO3\CMS\Core\Exception: malformed in /.../Sites/domain.test/Server/htdocs/typo3conf/ext/yoast_seo/Classes/UserFunctions/SnippetPreview.php:84

Stack trace:

0 /.../Sites/domain.test/Server/htdocs/typo3conf/ext/yoast_seo/Classes/UserFunctions/SnippetPreview.php(16): YoastSeoForTypo3\YoastSeo\UserFunctions\SnippetPreview->getContentFromUrl('/services')

1 [internal function]: YoastSeoForTypo3\YoastSeo\UserFunctions\SnippetPreview->render('', Array)

2 /.../Sites/typo3/typo3_src-9.5.0/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php(5942): call_user_func_array(Array, Array)

3 /.../Sites/typo3/typo3_src-9.5.0/typo3/sysext/frontend/Classes/ContentObject/UserContentObject.php(41): TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer->callUserFunction('YoastSeoForTypo...', Array, '')

4 /.../Sites/typo3/typo3_src-9.5.0/typo3/sysext/frontend/Classes...\n', referer: http://domain.test/typo3/index.php?route=%2Fweb%2Flayout%2F&token=697db40fd586a95afda5d59096a2c2e1ed91a710&id=4

Zillion01 commented 5 years ago

Yup, TYPO3 9.5.1. We got an error 500 (Internal Server Error) when requesting https://bliep.test/?type=1480321830&uriToCheck=https%253A%252F%252Fbliep.test%252F&cHash=7d7487fe50e47178e2ff1906986a5712 to analyse your content. Please check your javascript console for more information.

PHP Warning: get_meta_tags(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /Users/ikke/Sites/bliep/public/typo3conf/ext/yoast_seo/Classes/UserFunctions/SnippetPreview.php line 16

Maybe something with https on local domain?

haassie commented 5 years ago

Sorry for the late response. Can you check if this is still the issue with current master branch?

prathers commented 5 years ago

I can't reproduce after updating to v4.1.0 master

haassie commented 5 years ago

In that case, I will close the issue. Sorry again for the late response.

boettner-it commented 5 years ago

I got a similar error when running TYPO3 9.5.3 and yoast_seo 4.1.0.

Reason for the broken preview on my side was an nginx IP address restriction:

allow 123.124.125.126;    
deny all;

With adding the servers own IP and setting ['FE']['pageNotFoundOnCHashError'] = false the preview was back.

Will apply to Apache .htaccess in a similar manner:

Order deny,allow
Deny from all
Allow from 123.124.125.126
Satisfy Any
rickymathew commented 5 years ago

I still got the error in version 4.1.0 as follows We got an error 0 (error) when requesting https://exampletest.com/en/?type=1480321830&uriToCheck=https%253A%252F%252Fexampletest.com%252Fen%252Fproducts-solutions&cHash=de30cf79b51c6289cd338f44b7110644 to analyse your content. Please check your javascript console for more information.

Any one have any workaround?