nuvoleweb / ui_patterns

[NOTE] Development has moved to https://drupal.org/project/ui_patterns
https://drupal.org/project/ui_patterns
GNU General Public License v2.0
85 stars 56 forks source link

drupal 8.4.5 views not working correctly #179

Closed laurencefass closed 6 years ago

laurencefass commented 6 years ago

i'm have enabled the ui_patterns_test module which contains various patterns and a pattern-media.html.twig buried fairly deep in its directory structure. actually its here:

modules/contrib/ui_patterns/modules/ui_patterns_test/ui_patterns_test_theme/templates/patterns/media

this pattern is picked up by site/patterns and also as a views format. i have set up a view with media fields (body, title, text) and selected the media object. i have assigned views fields to pattern fields.

browser output

The website encountered an unexpected error. Please try again later.

watchdog log:

Type | php
-- | --
Tuesday, March 6, 2018 - 17:15
user1
http://kindfulmind.cms/articles
 
Twig_Error_Loader:  Template  "modules/contrib/ui_patterns/templates/pattern-media.html.twig" is not  defined (Drupal\Core\Template\Loader\ThemeRegistryLoader: Unable to find  template  "modules/contrib/ui_patterns/templates/pattern-media.html.twig" in the  Drupal theme registry.). in Twig_Loader_Chain->getCacheKey() (line 16 of /home/kindfulmind/public_html/web/modules/contrib/ui_patterns/modules/ui_patterns_views/templates/pattern-views-row.html.twig).
Error
192.168.1.200
 
ademarco commented 6 years ago

You need to enable the ui_patterns_test_theme theme and set it as default too in order to have the media pattern being correctly picked up.