Closed hamidpeywasti closed 4 years ago
This should work now! Could you give it a try?
Thank you, I'll try.
Closing for now
Hi. I get the same issue in a Contao 4.8. Could it be that your fix was just temporary?
When I try to open /api/page?url= it works only on pages without terminal42/contao-pageimage on it. There might be UTF-8 characters in the pageimage extension, which can't be encoded by the API
Hi,
[2019-09-29 19:46:33] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Malformed UTF-8 characters, possibly incorrectly encoded" at /home/abcdef/public_html/vendor/symfony/http-foundation/JsonResponse.php line 167 {"exception":"[object] (InvalidArgumentException(code: 0): Malformed UTF-8 characters, possibly incorrectly encoded at /home/vatanplast/public_html/vendor/symfony/http-foundation/JsonResponse.php:167)"} []
I've added a fix for terminal42/contao-pageimage
and added a ctype check to ensure there are no crashes due to unencodable strings. Please give it a try
I'm sorry for the late answer, at least here's my response. It works like a charm now; no more problems. Thank you!
Hi, I installed this in a Contao 4.6, but there is an error:
[2018-12-22 05:12:52] request.INFO: Matched route "content_api_sitemap". {"route":"content_api_sitemap","route_parameters":{"_route":"content_api_sitemap","_scope":"frontend","_token_check":false,"_controller":"DieSchittigs\\ContaoContentApiBundle\\Controller\\ContentApiController::sitemapAction"},"request_uri":"https://vatan.bio/api/sitemap","method":"HEAD"} [] [2018-12-22 05:12:52] security.INFO: Populated the TokenStorage with an anonymous Token. [] [] [2018-12-22 05:12:52] request.INFO: Matched route "content_api_sitemap". {"route":"content_api_sitemap","route_parameters":{"_route":"content_api_sitemap","_scope":"frontend","_token_check":false,"_controller":"DieSchittigs\\ContaoContentApiBundle\\Controller\\ContentApiController::sitemapAction"},"request_uri":"https://vatan.bio/api/sitemap","method":"GET"} [] [2018-12-22 05:12:52] security.INFO: Populated the TokenStorage with an anonymous Token. [] [] [2018-12-22 05:12:52] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Malformed UTF-8 characters, possibly incorrectly encoded" at /home/vatan/public_html/vendor/symfony/http-foundation/JsonResponse.php line 152 {"exception":"[object] (InvalidArgumentException(code: 0): Malformed UTF-8 characters, possibly incorrectly encoded at /home/vatan/public_html/vendor/symfony/http-foundation/JsonResponse.php:152)"} []
What's wrong?