Closed mlwebworker closed 2 years ago
Kann ich bestätigen
Problem betrifft den Ajax Request dieser failt mit einem 403.
gibt es dazu eine Fehlermeldung im Systemlog, und/oder was steht in der Netzwerk-Antwort im Browser?
Netzwerk Antwort im Browser auf den xhr Request ist eine 403
Im Debug Log steht:
[2022-02-22T09:51:05.148619+01: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":"https://DOMAIN/contao?act=toggle&do=nodes&field=invisible&id=280&ref=PGcMkmOP&rt=d943a8154a74448dc6ee.U6TdJQAcjDVEHHlIoiNUdQjTXeggIK3gd2BUN_mnSA4.EdaJbVpqyWE2ahJl5GcFL0KjAtBVaZWtIBUmAoDiekU644hPTn61eA1sSQ&table=tl_content","method":"GET"} [] [2022-02-22T09:51:05.152423+01:00] security.DEBUG: Read existing security token from the session. {"key":"_security_contao_backend","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"} [] [2022-02-22T09:51:05.166514+01:00] security.DEBUG: User was reloaded from a user provider. {"provider":"Contao\\CoreBundle\\Security\\User\\ContaoUserProvider","username":"ADMIN"} [] [2022-02-22T09:51:05.240136+01:00] security.DEBUG: Access denied, the user is neither anonymous, nor remember-me. {"exception":"[object] (Contao\\CoreBundle\\Exception\\AccessDeniedException(code: 403): Node of folder type cannot have content elements at /www/htdocs/CONTAO-ROOT/vendor/terminal42/contao-node/src/EventListener/ContentListener.php:90)"} [] [2022-02-22T09:51:05.240998+01:00] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: "Node of folder type cannot have content elements" at /www/htdocs/CONTAO-ROOT/vendor/symfony/security-http/Firewall/ExceptionListener.php line 138 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\AccessDeniedHttpException(code: 0): Node of folder type cannot have content elements at /www/htdocs/CONTAO-ROOT/vendor/symfony/security-http/Firewall/ExceptionListener.php:138)\n[previous exception] [object] (Contao\\CoreBundle\\Exception\\AccessDeniedException(code: 403): Node of folder type cannot have content elements at /www/htdocs/CONTAO-ROOT/vendor/terminal42/contao-node/src/EventListener/ContentListener.php:90)"} [] [2022-02-22T09:51:05.293451+01:00] security.DEBUG: Stored the security token in the session. {"key":"_security_contao_backend"} [] [2022-02-22T09:51:05.363321+01:00] app.DEBUG: Executing cron job "Contao\CoreBundle\Cron\LegacyCron::onMinutely" [] []
@Ainschy if you enable the debug mode you can get a full stack trace via the Symfony toolbar at the bottom (there is a section for AJAX requests where you can open the profiler for each request).
Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: Node of folder type cannot have content elements
at vendor/symfony/security-http/Firewall/ExceptionListener.php:138 at Symfony\Component\Security\Http\Firewall\ExceptionListener->handleAccessDeniedException(object(ExceptionEvent), object(AccessDeniedException)) (vendor/symfony/security-http/Firewall/ExceptionListener.php:103) at Symfony\Component\Security\Http\Firewall\ExceptionListener->onKernelException(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(ExceptionEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (vendor/symfony/http-kernel/HttpKernel.php:213) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(AccessDeniedException), object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:85) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:44)
Danke für Fixen. Bin erst heute zum Testen gekommen funktioniert jetzt bei mir
In Contao 4.13 RC2 können Inhaltselemente die innerhalb von Nodes erstellt werden nicht über das Auge ausgeblendet werden. Das graue Auge erscheint zwar, aber nach dem Reload im Browser ist es wieder grün und im Frontend wird das Element dann natürlich auch nicht ausgeblendet. Contao 4.13 RC2 Node 1.5.2 XAMPP mit PHP 7.4.27 Windows 10
Gegencheck in einer 4.12 zeigt, dass das Ausblenden dort funktioniert. Contao 4.12.5 Node 1.5.2 PHP 7.4.27 Hostingwerk