Closed cdaecke closed 1 year ago
To be honest, the strange part is, that the extension works without changes in another website without any problems and I do not see the difference...
Did you check your php Version on both systems? I got the same error, and it seems to occur on php 8.1 only. Just tested it with php 7.4 & 8.0 and it worked.
I have now tested with a fresh system on PHP v7.4, v8.1 and even v8.2. All working without any problems...?!
@cdaecke: do you use env variables in your config/sites/site_name/config.yaml? I came across your issue as I have the same problem on my sites. The 500 error that's generated in my case is:
cURL error 6: Could not resolve host: ahk-%env(dev_context)%.netklaar.amsterdam
caused by using this env var in config.yaml:
base: 'https://reinwardt-%env(DEV_CONTEXT)%.netklaar.amsterdam/'
Changing the header as you did, to HTTP_X_YOAST_PAGE_REQUEST fixes the problem - although it's not a real fix ofcourse, as it should be possible to use env vars in the config.yaml
It seems, that the current version 9.0.0 of ext:yoast_seo
solves the problem.
@cdaecke: thanks for the info, it does indeed.
So this issue can be closed.
Thanks again for the extension and your work!
Please give us a description of what happened.
When selecting a normal page in the TYPO3 backend, I do not get the expected Yoast preview snippet, but the following error:
Looking for a solution, i found out, that the preview works perfektly fine, when I change the following line https://github.com/Yoast/Yoast-SEO-for-TYPO3/blob/6ce23d61c91afa5adf71e15b54c1e9aa2fd95511/Classes/Service/PreviewService.php#L81
to this:
'HTTP_X_YOAST_PAGE_REQUEST' => GeneralUtility::hmac(
I came across this, because the
YoastReguestHash
checks against an uppercase phrase and underscores:https://github.com/Yoast/Yoast-SEO-for-TYPO3/blob/6ce23d61c91afa5adf71e15b54c1e9aa2fd95511/Classes/Utility/YoastRequestHash.php#L16-L22
To be honest, the strange part is, that the extension works without changes in another website without any problems and I do not see the difference... But at least the change above does not break the functionality in the working website :-)
Technical info