- Issue created by @heikkiy
- 🇺🇸United States josh.fabean
I'm having a similar issue, added ui_pattern display as a row display in a View, now I cannot edit my mega menu which uses a block from that view in it. I'm currently trying to figure if I can figure out a patch that checks to make sure template is available if not don't print or do something like Views does where it prints
Pattern Views row plugin does not support preview.
- 🇺🇸United States josh.fabean
Here is a pretty crude patch that just checks if the current theme is admin theme and if so just won't render the pattern using the same method that Views uses inside the Views preview.
I was thinking a better answer would be checking to confirm if template can be loaded, if it cannot output an error instead of white screening the website.
- 🇫🇮Finland heikkiy Oulu
@josh.fabean I can test the patch tomorrow but I suspect it might not solve our issue because we are not using Views when the issue happens but instead we are using a field formatter like in the picture.
- Status changed to Needs review
over 1 year ago 7:55am 27 June 2023 - last update
over 1 year ago Patch Failed to Apply - 🇱🇺Luxembourg B-Prod
here is a patch more global, which tries to fix this issue in a different way. Actually this issue is caused by the cache on run and could be easily fixed.
When defining a pattern inside a front theme, and previewing on another theme (admin or other), you get this error.The patch also fixes compatibility with the ui_patterns_view integration.
- last update
over 1 year ago 80 pass, 2 fail - 🇱🇺Luxembourg B-Prod
This is an update to the previous patch, for the current 1.x branch.
The last submitted patch, 7: ui_patterns-preview-pattern-from-other-theme-3357835-7.patch, failed testing. View results →
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
about 1 year ago 3:11pm 13 November 2023 - 🇫🇮Finland heikkiy Oulu
I tested the patch in #7 and I was still able to reproduce the issue. Then I found a similar issue from Components 🐛 Template is not defined error on admin pages when using administration theme Needs work . With both patches the error message still appears but it's more of a flash now before it disappears. I did get a screen capture of the error.
- 🇸🇮Slovenia alesr
I get this error:
Twig\Error\LoaderError: There are no registered paths for namespace "components" in "modules/contrib/ui_patterns/templates/patterns-use-wrapper.html.twig" at line 9. in Twig\Loader\FilesystemLoader->findTemplate() (line 227 of /var/www/html/vendor/twig/twig/src/Loader/FilesystemLoader.php).
where is just this line
{% include use %}
The patch in #7 didn't solve it for me.