Closed (fixed)
Project:
Drupal core
Version:
8.6.x-dev
Component:
views_ui.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2014 at 15:12 UTC
Updated:
9 Feb 2024 at 01:05 UTC
Jump to comment: Most recent
Comments
Comment #1
dawehnerThe idea is to enable twig debug (Note: this requires #2118743: Twig debug output does not display all suggestions when an array of theme hooks is passed to #theme to be in, feel free to help there :)).
Comment #3
BrijeshParmar commentedStill not able to find any solution,
Any help or advice is welcome.
Comment #4
dawehner... views no longer provide suggestions.
Comment #5
stefan.korn@Brijesh_Parmar: You can have similar results if you use TWIG debugging, read here: https://www.drupal.org/node/1906392 - not in the same place and maybe not as comfortable as in D7 views but at least with the same informations.
Comment #6
dawehnerThank you @stefan.korn for giving support!
Comment #8
rogerbI am using Drupal 8.4.3 and have twig debugging turned on but I am not seeing template suggestions for views. For other templates yes, but not for views.
Comment #9
stefan.korn@RogerB: You are right, there is no usable debug output for views actually. I was a bit to enthusiastic about TWIG debug in #5 and did not recognize that Views does not correctly deal with TWIG debug output.
Actually there is https://www.drupal.org/project/drupal/issues/2118743 and https://www.drupal.org/project/drupal/issues/2923634 tackling this issue. While the issue was first since discovering handled with issue https://www.drupal.org/project/drupal/issues/2118743 and there seems to be a patch, lastly it was discovered that views is handling the theme template suggestions not correct (using an outdated views specific way for theme suggestions that is not compatible with the twig debug output for template suggestions). So now it seems that https://www.drupal.org/project/drupal/issues/2923634 will bring views up to date about the suggestions generating method and hopefully we would see this committed soon.
Meanwhile you can try one of the patches and see if that helps on that. Or you can take a look into code of https://api.drupal.org/api/drupal/core%21modules%21views%21src%21ViewExe... and see what suggestions will be built. This is for the most hooks, except for views_view_field hook, there is this function https://api.drupal.org/api/drupal/core%21modules%21views%21src%21Plugin%...
Comment #10
maxplus commentedThe patch #8 from https://www.drupal.org/project/drupal/issues/2923634#comment-12417950 indeed solved this issue for me and now showing all theme suggestions in twig debug
Comment #11
jayemel commentedI'm dissappointed that the solution is to comb 2995+ lines of HTML source for a given page to find the template suggestions, when, previously in 7, I could do it with one click on the view edit page.
Then, according to this thread, I also have to patch views to even get the suggestions?
I appreciate all the hard work gone into Drupal 8, but this really seems like a step backwards to me and will certainly be a development hurdle even once it's working correctly.
Comment #12
dgtlmoon commentedSo this issue is kind of a duplicate
#2118743: Twig debug output does not display all suggestions when an array of theme hooks is passed to #theme covers #2923634: [PP-1] Use hook_theme_suggestions in views
Comment #13
jmuzz commentedI sort of agree with @jmljunior . I never liked that views had a different way of handling this but I hope that the theme debug option isn't meant to be the end of theme debugging and we can someday get devel_themer functionality again.
Comment #14
candelas commentedReally sad that "Theme Information" is removed from a site builder point of view.
Comment #15
nchase commentedit's another example of those stripped away tools that were pretty usefull in d7. :(
Comment #16
back from 7 commentedI agree with @Nchase.
Drupal 8 is way more complicated with simple tasks.
Drupal 8 is also way better at other tasks. Not sure how I feel about 8, since I am developing my first site.
The process of even getting "Theme debug" tuned on is not friendly. Still, the options for views templates seem limited compared to D7
Comment #17
lubwn commentedI agree. We want this functionality back in the UI of views. Why was it stripped in the first place?
Comment #18
lunk rat commentedI miss it right now.
Comment #19
xem8vfdh commentedI'd sure love to have this functionality back, so simple :(