Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 500 error #4 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix 500 error #4 #5

wants to merge 1 commit into from

Conversation

rafaelgou
Copy link

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:

  • edit the file plugins/ReadOnlyAccessBundle/Resources/views/index.html.twig
  • remove the line {% import "macros/actions.html.twig" as actions %}
  • clear an warmup the cache:
cd kimai/
bin/console cache:clear
bin/console cache:warmup

Then you get the page back

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:

- edit the file `plugins/ReadOnlyAccessBundle/Resources/views/index.html.twig`
- remove the line `{% import "macros/actions.html.twig" as actions %}`
- clear an warmup the cache:

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

Then you get the page back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant