Ich kriege es leider nicht hin ...
Habe jetzt das Skript in dieser Form innerhalb eines HTML-Elements eingebunden:
HTML-Code:
<div class="block">{{file::rechner_bearbeitet.php}}</div>
Fehlermeldung: Das Request-Token konnte nicht validiert werden.
Bei aktiviertem Debug-Modus finde ich beim Abschicken in der Log-Datei folgenden Eintrag:
Code:
[2022-07-06T12:35:29.367642+02:00] request.INFO: Matched route "contao_backend". {"route":"contao_backend","route_parameters":{"_route":"contao_backend","_scope":"backend","_token_check":true,"_controller":"Contao\\CoreBundle\\Controller\\BackendController::mainAction"},"request_uri":"http://contao2022.xxx.de/contao?do=article&id=271&ref=QmneIR03&rt=4983ee846f75ce65.j3m6FpbfKNP5_NWQJ20rimbjy_sm1uxOW_Kq4uctm88.wSDQLvWNeeSAxJv6EwptwFK0pppKvpUjCKb5jLhc6YzbHohn9O9hkq_RhA&table=tl_content","method":"GET"} []
[2022-07-06T12:35:29.382540+02:00] security.DEBUG: Read existing security token from the session. {"key":"_security_contao_backend","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"} []
[2022-07-06T12:35:29.437131+02:00] security.DEBUG: User was reloaded from a user provider. {"provider":"Contao\\CoreBundle\\Security\\User\\ContaoUserProvider","username":"tgruetzner"} []
[2022-07-06T12:35:29.886089+02:00] security.DEBUG: Stored the security token in the session. {"key":"_security_contao_backend"} []
[2022-07-06T12:35:30.633208+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"8753a7"},"request_uri":"http://contao2022.xxx.de/_wdt/8753a7","method":"GET"} []
[2022-07-06T12:35:37.305687+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was not able to match, message "No routes found for "/formular.php"." [] []
[2022-07-06T12:35:37.339039+02:00] app.DEBUG: Router Symfony\Cmf\Component\Routing\DynamicRouter was not able to match, message "" [] []
[2022-07-06T12:35:37.339213+02:00] app.DEBUG: Router Symfony\Cmf\Component\Routing\DynamicRouter was not able to match, message "No routes found for "/formular.php"." [] []
[2022-07-06T12:35:37.448273+02:00] request.INFO: Matched route "tl_page.140.error_404". {"route":"tl_page.140.error_404","route_parameters":{"_token_check":true,"_controller":"Contao\\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","_format":"html","_canonical_route":"tl_page.140","pageModel":{"Contao\\PageModel":[]},"_url_fragment":"formular.php","_route":"tl_page.140.error_404","_route_object":{"Symfony\\Component\\Routing\\Route":[]}},"request_uri":"http://contao2022.xxx.de/formular.php","method":"POST"} []
[2022-07-06T12:35:37.467101+02:00] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\BadRequestHttpException: "Invalid CSRF token. Please reload the page and try again." at /var/www/linweb48/data/www/contao2022.xxx.de/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php line 91 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException(code: 0): Invalid CSRF token. Please reload the page and try again. at /var/www/linweb48/data/www/contao2022.xxx.de/vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:91)\n[previous exception] [object] (Contao\\CoreBundle\\Exception\\InvalidRequestTokenException(code: 0): Invalid CSRF token. Please reload the page and try again. at /var/www/linweb48/data/www/contao2022.xxx.de/vendor/contao/core-bundle/src/EventListener/RequestTokenListener.php:102)"} []
[2022-07-06T12:35:38.243917+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"c8b6d6"},"request_uri":"http://contao2022.xxx.de/_wdt/c8b6d6","method":"GET"} []
Und wenn der Debug-Modus schon aktiviert ist, wenn ich die Seite frisch aufrufe, sieht die Fehlermeldung so aus:
Code:
[2022-07-06T12:39:20.085062+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was not able to match, message "No routes found for "/de/service.html/"." [] []
[2022-07-06T12:39:20.226283+02:00] request.INFO: Matched route "tl_page.209". {"route":"tl_page.209","route_parameters":{"_token_check":true,"_controller":"Contao\\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","_format":"html","_canonical_route":"tl_page.209","parameters":"","pageModel":{"Contao\\PageModel":[]},"_route":"tl_page.209","_route_object":{"Contao\\CoreBundle\\Routing\\Page\\PageRoute":[]}},"request_uri":"http://contao2022.xxx.de/preview.php/de/service.html","method":"GET"} []
[2022-07-06T12:39:20.283124+02:00] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[2022-07-06T12:39:20.284143+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was not able to match, message "No routes found for "/de/service.html/"." [] []
[2022-07-06T12:39:20.495686+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was unable to generate route. Reason: 'Route 'cmf_routing_object' not found': Unable to generate a URL for the named route "cmf_routing_object" as such route does not exist. [] []
[2022-07-06T12:39:20.497159+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was unable to generate route. Reason: 'Route 'cmf_routing_object' not found': Unable to generate a URL for the named route "cmf_routing_object" as such route does not exist. [] []
[2022-07-06T12:39:20.498034+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was unable to generate route. Reason: 'Route 'cmf_routing_object' not found': Unable to generate a URL for the named route "cmf_routing_object" as such route does not exist. [] []
[2022-07-06T12:39:20.498709+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was unable to generate route. Reason: 'Route 'cmf_routing_object' not found': Unable to generate a URL for the named route "cmf_routing_object" as such route does not exist. [] []
[2022-07-06T12:39:20.504194+02:00] app.DEBUG: Router Symfony\Bundle\FrameworkBundle\Routing\Router was unable to generate route. Reason: 'Route 'cmf_routing_object' not found': Unable to generate a URL for the named route "cmf_routing_object" as such route does not exist. [] []
[2022-07-06T12:39:21.229137+02:00] request.CRITICAL: Uncaught PHP Exception ErrorException: "Warning: Undefined array key "og:image"" at /var/www/linweb48/data/www/contao2022.xxx.de/vendor/contao-themes-net/mate-theme-bundle/src/Resources/contao/templates/layouts/mate/fe_page_mate.html5 line 34 {"exception":"[object] (ErrorException(code: 0): Warning: Undefined array key \"og:image\" at /var/www/linweb48/data/www/contao2022.xxx.de/vendor/contao-themes-net/mate-theme-bundle/src/Resources/contao/templates/layouts/mate/fe_page_mate.html5:34)"} []
[2022-07-06T12:39:21.595807+02:00] app.DEBUG: Executing cron job "Contao\CoreBundle\Cron\LegacyCron::onMinutely" [] []
[2022-07-06T12:39:22.094088+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"2b02bf"},"request_uri":"http://contao2022.xxx.de/preview.php/_wdt/2b02bf","method":"GET"} []
[2022-07-06T12:39:22.464377+02:00] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_route":"_wdt","_controller":"web_profiler.controller.profiler::toolbarAction","token":"2b02bf"},"request_uri":"http://contao2022.xxx.de/_wdt/2b02bf","method":"GET"} []
Lesezeichen