getgrav / getgrav/grav-plugin-admin
Modular list page with template override throws error
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
Hallo,
when i use @self.modular in a page and want to edit it with the admin interface i get an error like this:
`An exception has been thrown during the rendering of a template ("Template "modular/fluid-container.html.twig" is not defined.") in "@Page:/home/blumberg/public_html/grav/user/pages/01.home" at line 2.`
But the site is viewed as it should.
When i delete the twig code ...
```
{% for p in page.collection %}
{{ p.content }}
{% endfor %}
```
... then it works well.
Contributor guide
Research direction
Reproduce the error in the admin interface using @self.modular and the supplied collection loop, then trace why modular/fluid-container.html.twig is unavailable while the site renders correctly. Compare the admin and site rendering paths; done means the page can be edited without the template exception and the collection loop remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100