Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is my first bug report, so forgive me if I'm doing this wrong.
After installing today's release of 7.x-3.6, some of the CSS on my page was no longer being applied. After some investigation, it appears that the CSS classes added in CSS properties are being converted to lower case. Upper case letters are still valid for class attributes and, since class attributes are case sensitive, it is preventing the CSS from being applied.
I suspect that this bug was introduced in the following feature request implemented in today's release:
https://www.drupal.org/node/1441218
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#16 | panels-underscores-in-ids-2785843-16.patch | 3.09 KB | bkosborne |
#5 | 2785843-5.patch | 820 bytes | svenb |
Comments
Comment #2
bkosborneYou are correct that the issue you linked introduced the problem. I realize now that the issue I created #2785917: Underscores in CSS IDs for panes are converted to hyphens after 3.6 update is similar to the one you reported here.
Comment #3
jackalope CreditAttribution: jackalope commentedThanks for filing this issue @karen11, and thanks to @bkosborne for citing your related ticket! Since this one came first I'm going to mark #2785917: Underscores in CSS IDs for panes are converted to hyphens after 3.6 update as a duplicate so as to focus all efforts here.
Comment #4
jackalope CreditAttribution: jackalope commentedActually @bkosborne, rather than closing your well-documented ticket myself, I'll suggest that you move your findings here if it's not too much trouble and close the other as a duplicate. :)
Comment #5
svenb CreditAttribution: svenb commentedWhat's the reason for lowercase CSS classes? In my opinion there's no need to do so. That's why I created a patch that just removes the drupal_strtolower($class) function.
Comment #6
bkosborneComment #7
bkosborneMarked my issue #2785917: Underscores in CSS IDs for panes are converted to hyphens after 3.6 update as a duplicate of this one, so we aren't splitting effort to fix the same root problem, as suggested.
Comment #8
bkosborne@svenb, the reasoning for going to lowercase is detailed in this issue somewhere (I recall reading it yesterday): https://www.drupal.org/node/1441218 .... These changes were made so that you could insert tokens for the CSS class / ID, so there was an effort to make them more machine-name friendly. So a token for a taxonomy term "My Term" gets converted to "my-term"
Comment #9
bkosborneComment #10
DamienMcKennaComment #11
japerryComment #12
dsnopekI posted a patch for this same problem on #2785917: Underscores in CSS IDs for panes are converted to hyphens after 3.6 update. Re-posting it here! We're going to release Panopoly with this patch.
Comment #13
dsnopekComment #14
bkosborneThe issue here is that CSS classes are converted to lowercase and CSS IDs are run through drupal_html_id. Both are problems for existing panes. The patch addresses the issue with the CSS ID, but not classes.
Will need to examine the original patch that caused these problems to see all the areas that need to be reverted.
Comment #15
bkosborneHere's a patch that removes usage of
drupal_html_id
andstrtolower
that was brought in from #1441218: Use keyword replacements for CSS settings. That issue did not properly consider the implication of existing CSS classes or IDs that would be transformed by the new code.Assuming this is committed, another issue would probably need to be opened to come up with a better way to format the replaced tokens.
Comment #16
bkosborneOops, syntax error.
Comment #17
jackalope CreditAttribution: jackalope commented@bkosborne Thanks for that patch in #16! I've applied it to a local site running Drupal 7.44 (don't ask) and Panels 7.x-3.6; your patch fixes the broken theme for me. I'll test on other sites running Drupal 7.50 but can't imagine that will cause a difference!
Comment #18
jackalope CreditAttribution: jackalope commentedHappy to report that the patch in #16 applies nicely and fixed the broken theme I encountered on two more Drupal 7.50 sites running Panels 7.x-3.6. Dare I say this is RTBC and ready to commit? :) Thanks again @bkosborne!
Comment #19
karen11I also tested patch #16 and it fixed the issues I encountered after installing Panels 7.x-3.6. Thanks @bkosborne!
Comment #20
dsnopekRTBC +1!
Comment #21
byronveale CreditAttribution: byronveale as a volunteer commentedI can confirm that #16 patch works, for me at least…
Comment #22
dsnopekDiscussed this with @japerry at MWDS. He wants to have a working patch on #2787099: Add checkbox to normalize CSS IDs and classes before merging this one.
Comment #23
bkosborneMakes sense, don't want to break sites that have been using the token feature either.
Comment #25
japerryOkay we'll look at the normalization in the other patch. Fixed!