You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just spent an hour trying to understand why the PLUGIN_ERROR:ERROR translation had no effect on out-of-box grav installation. As it turned out, Quark (default theme) overrides error.html.twig with its own, which uses different variable (ERROR).
So here is my issue:
Both grav-plugin-error and quark theme (i know there are more..) define h1 header in the twig files. Error page itself is not defined in theme, but exists in (mandatory) error plugin. This creates situation, where single functionality (showing error message content) is divided into two different places with conflicting translations. This will be the same for other themes as well, as the plugins error.html.twig is too basic to be useful without theme overriding it, which means the theme twig needs to define h1 again.
Maybe I am missing something obvious here, but I do not see real benefit in having in plugin error template and error page over having default.md page and allowing theme default template render it. If user needs to define separate template for error pages or start using the theme provided one, they could easily create /error/error.md and set template there.
So, what i suggest for both quark theme and plugin-error:
rename plugins error.md to default.md (including php change)
move h1 header from plugin error.html.twig to default.md
remove plugins error.html.twig completely (expect theme to have default template)
in quark error.html.twig remove h1 header (or remove error.html.twig completely, as it is no different from default) and allow error plugin OR custom error page provide page content.
1-3 are not breaking changes toward out-of-box installation, but may break other themes that have worked around the need to provide error page header themselves.
Alternatively, the translation could be explained in the readme more clearly..
Thoughts?
The text was updated successfully, but these errors were encountered:
I just created a page that I can modify from the admin panel and add translations etc and modified the plugin template to only spit out the page contents.
I just spent an hour trying to understand why the PLUGIN_ERROR:ERROR translation had no effect on out-of-box grav installation. As it turned out, Quark (default theme) overrides error.html.twig with its own, which uses different variable (ERROR).
So here is my issue:
Both grav-plugin-error and quark theme (i know there are more..) define h1 header in the twig files. Error page itself is not defined in theme, but exists in (mandatory) error plugin. This creates situation, where single functionality (showing error message content) is divided into two different places with conflicting translations. This will be the same for other themes as well, as the plugins error.html.twig is too basic to be useful without theme overriding it, which means the theme twig needs to define h1 again.
Maybe I am missing something obvious here, but I do not see real benefit in having in plugin error template and error page over having default.md page and allowing theme default template render it. If user needs to define separate template for error pages or start using the theme provided one, they could easily create /error/error.md and set template there.
So, what i suggest for both quark theme and plugin-error:
1-3 are not breaking changes toward out-of-box installation, but may break other themes that have worked around the need to provide error page header themselves.
Alternatively, the translation could be explained in the readme more clearly..
Thoughts?
The text was updated successfully, but these errors were encountered: