fungus75 / ReadOnlyAccessBundle

Read Only Access Plugin for Kimai
MIT License
4 stars 6 forks source link

Fix 500 error #4 #5

Open rafaelgou opened 4 years ago

rafaelgou commented 4 years ago

Cause: there's a reference to a non-existent template:

[2020-02-02 00:30:18] request.CRITICAL: Uncaught PHP Exception Twig\Error\LoaderError: "Unable to find template "macros/actions.html.twig" (looked into: /opt/kimai/templates, /opt/kimai/vendor/symfony/twig-bridge/Resources/views/Form) in "@ReadOnlyAccess/index.html.twig" at line 5." at /opt/kimai/vendor/twig/twig/src/Loader/FilesystemLoader.php line 250 {"exception":"[object] (Twig\\Error\\LoaderError(code: 0): Unable to find template \"macros/actions.html.twig\" (looked into: /opt/kimai/templates, /opt/kimai/vendor/symfony/twig-bridge/Resources/views/Form) in \"@ReadOnlyAccess/index.html.twig\" at line 5. at /opt/kimai/vendor/twig/twig/src/Loader/FilesystemLoader.php:250)"} []
[2020-02-02 00:30:18] security.DEBUG: Stored the security token in the session. {"key":"_security_secured_area"} []

So a solution:

cd kimai/
bin/console cache:clear
bin/console cache:warmup

Then you get the page back