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

Support preview views UI #54

Closed
drupal4share opened this issue Feb 3, 2017 · 4 comments
Closed

Support preview views UI #54

drupal4share opened this issue Feb 3, 2017 · 4 comments
Labels

Comments

@drupal4share
Copy link

I have use defaul theme bootstrap. I copy folder modules/contrib/ui_patterns/tests/ui_patterns_test_theme/templates/patterns/button to themes/bootstrap/templates/patterns/button and clear cache. Create simple view use pattern lab Button. Preview of view don't working. Click button Update preview don't show anything. When i check log message, i saw have message error

"A fatal error occurred: Template "modules/contrib/ui_patterns/templates/pattern-button.html.twig" is not defined (Drupal\Core\Template\Loader\ThemeRegistryLoader: Unable to find template "modules/contrib/ui_patterns/templates/pattern-button.html.twig" in the Drupal theme registry.) in "modules/contrib/ui_patterns/modules/ui_patterns_views/templates/pattern-views-row.html.twig" at line 16."

@ademarco
Copy link
Member

ademarco commented Feb 4, 2017

Actually patterns do not support views preview since they are bound to the theme that exposes them. I'll add a message stating it when clicking on the preview button, so we avoid that fatal.

@ademarco
Copy link
Member

ademarco commented Feb 4, 2017

Message added, closing.

@jigarius
Copy link

A suggestion. Can the plugin expose a setting named: Preview theme? Most of the sites have one theme for visitors. If that theme can be used to render previews, the module will become even more useful and practical.

@mikemccaffrey
Copy link

I created #239 because the error message introduced in this ticket was not only showing up in Views previews, but also anytime one of my views is updated using an AJAX request.

It seems like the preview flag might always be set when returning view results using AJAX, so we might want to find another way to detect if they are a preview in the admin theme, or an update to a view in the front-end theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants