Needs work
Project:
Drupal core
Version:
main
Component:
markup
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Aug 2011 at 15:19 UTC
Updated:
2 Mar 2023 at 00:16 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidNothing to do with HTML5. Also, I'm not sure *why* we even support a suggestion like page__node__% to begin with? I think we should remove the wildcard functionality.
Comment #2
dave reidThis change seems to have originated with #167112: PHPTemplate Suggestion wildcard. We should remove them when processed by CSS classes.
Comment #3
dave reidLet's skip any suggestions with wildcards in them.
Comment #4
barrapontoWonderful.
I have added a comment to make it clear why we are filtering % out.
Comment #5
marcingy commentedSorry for the nitpick
// Ignore front page and wildcard suggestions
needs a period at the end otherwise looks good.
Comment #6
barrapontoDone.
@marcingy You will like the patch I posted at #1054848: Fixing common typos through codespell.py, although it needs updating.
Comment #7
barrapontoComment #8
hanpersand commentedSubscribing.
Comment #9
marcingy commentedlooks good
Comment #10
andypost+1, this also fixes taxonomy page body classes
before patch:
html not-front logged-in no-sidebars page-taxonomy page-taxonomy-term page-taxonomy-term- page-taxonomy-term-45 toolbar toolbar-drawer footer-columnsafter patch:
html not-front logged-in no-sidebars page-taxonomy page-taxonomy-term page-taxonomy-term-45 toolbar toolbar-drawer footer-columnsComment #11
pvasili commentedSubscribing
Comment #12
damien tournoud commentedI was ready to write "This check needs to go into
theme_get_suggestions()", until I saw comment #2.So either:
Comment #13
barrapontoThe reason we have the wildcard suggestion there, in the first place, is to have different templates for /user and /user/1. It makes sense for templates and it makes sense for CSS classes as well.
According to http://www.w3.org/TR/CSS2/syndata.html#characters, the closest we can get to a wildcard class would be ending it with a hyphen. I agree we should use a explicit string (-wildcard or -ALL). I wonder if it ever conflicts with the template name (let's hope not).
Comment #14
BarisW commentedReplaced % with 'wildcard' in list_themes().
Body classes before:
"html not-front logged-in one-sidebar sidebar-first page-node page-node- page-node-1 node-type-article toolbar toolbar-drawer"Body classes after:
"html not-front logged-in one-sidebar sidebar-first page-node page-node-wildcard page-node-1 node-type-article toolbar toolbar-drawer"Comment #16
barrapontoUpdating the tests.
Comment #17
BarisW commentedReroll.
Comment #18
alansaviolobo commentedReroll.
Comment #19
BarisW commentedThe comments have been removed, so let's remove it for the wildcard too.
Comment #22
BarisW commentedHere's a re-roll.
Comment #23
mgiffordNeeds re-roll.
Comment #24
BarisW commentedComment #25
BarisW commentedComment #36
ranjith_kumar_k_u commentedRe-rolled for 9.2
Comment #41
smustgrave commentedRemoved #36 and fixed testing issue.
Tried to interdiff but got
interdiff: Error applying patch1 to reconstructed file
Comment #42
smustgrave commentedThis is the same as #41 but with a tests-only patch.
Comment #44
smustgrave commentedComment #46
catchIsn't page__node identical to page__node__wildcard?
Comment #47
smustgrave commentedGuess it’s the same so should we remove page_node_%
Should we be worried about BC