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.
I've just tried upgrading from 5.1 to 5.3 and the styling of the message boxes has gone.
I have picked through the notes on upgrading to 5.2 and 5.3 from 5.1 and have made sure to replace the zen-grids directory with the one from zen/STARTERKIT but this hasn't helped either.
I've picked through the sass files that the theme is using and can't find any styling of these message boxes anywhere, apart from some entries that are blank.
It looks as though after updating zen, that the system messages css styles are no longer loading. Will try and figure out why and report back.
Comments
Comment #1
kiwimind CreditAttribution: kiwimind commentedOk, it would appear that the theme is not outputting the
modules/system/system.messages.css
andmodules/system/system.theme.css
files in the head.I'm not overriding the html.tpl.php file.
It seems as though my theme's .info file does not have the lines:
It was working fine before the upgrade though. Any reason for this?
Comment #2
kiwimind CreditAttribution: kiwimind commentedFurther to this:
It seems that the update has added in the following lines to zen.info:
This then overrides the system files and causes them to fail.
Is this intentional?
I'm happy to put a small patch together to fix this, but it barely seems worth it for such a small fix.
Comment #3
erikphanson CreditAttribution: erikphanson commentedI have the same issue after upgrading.
So, I'm a newb to all of this, but I removed the code in the zen.info and it started working again.
I know enough that I shouldn't taking things out of the base theme, but I'm not sure what else to do here. Nothing I was doing in my subtheme.info was working.
Comment #4
echoz CreditAttribution: echoz commented7.x-5.3 has the styling for messages in STARTERKIT/sass/components/_misc.scss (or STARTERKIT/css/components/misc.css if you're not using sass).
Comment #5
mike_san CreditAttribution: mike_san commentedI've also commented out stylesheets in the .info file, the next update will fix this issue
Comment #6
echoz CreditAttribution: echoz commentedAre you folks having this issue updating your subtheme to include the new _misc.scss (or misc.css if not using sass) and including it in the styles.scss (or styles.css), clearing the drupal cache and clearing your browser cache?
Test this without removing code from .info files as suggested above.
Comment #7
kiwimind CreditAttribution: kiwimind commentedOk, so I've now copied _misc.scss in to my subtheme to get it working and included it in _base.scss. It is important to ensure that it is at the bottom of the file so that your _custom.scss is loaded first as this has come mixins that are used by _misc.scss.
Unfortunately I'm now getting the error:
This points to the images not being included, so I copied all of the images starting message-24-* from STARTERKIT/images to mytheme/images, which solved this error.
Next...
This is defined in tabs.scss, so things look like they're being called in the wrong order.
Am I *not* supposed to include the _misc.scss file in _base.scss? I'm trying to do this site-wide, so don't really want to have to go in to every sass file and add in the @import line.
I hope I'm missing something obvious.
Thanks.
Comment #8
JohnAlbinYes, the removal of those stylesheets was intentional. The CSS from those removed files has been improved and incorporated into STARTERKIT's set of CSS.
However, it was not intentional to break your sub-themes.
The fix for this is that Zen should only remove those files if the Zen theme is the active theme. Otherwise, it will let the sub-theme remove those files (or not.) Investigating how to do this.
Comment #9
kiwimind CreditAttribution: kiwimind commentedThanks John.
Even some instructions on what to add where might suffice. I did check the changes prior to tesing this upgrade, none of which mentioned this (from 5.1 - 5.3).
I seem to be chasing errors around due to what is being called first.
I don't see where I can add the _misc.scss file to my sub-theme's files consistently, apart from perhaps at the bottom of each file. It needs to be included below the declaration of $tabs-border in the tabs.scss file.
I was hoping for some kind of simple include, like in the _base.scss file, so that all other files would pick up on it, but this clearly didn't work.
Look forward to seeing what the fix is.
Cheers.
Comment #10
JohnAlbinOk. For now, you should remove these lines from zen.info:
That will restore the missing styling that your sub-theme relies on.
Comment #11
JohnAlbinThis is the change that I made to the Zen base theme: http://drupalcode.org/project/zen.git/commitdiff/86eb4e4
After 12 hours, this change will be incorporated into new 7.x-5.x-dev release downloads. I will make a new 7.x-5.4 release within a week; I'd like to wait and see if there are any other bugs that I missed before I tag the new release.
Comment #12
kiwimind CreditAttribution: kiwimind commentedOk, so don't muck about with trying to add the _misc.scss file back in any more then?
Thanks for the message.
Comment #13
JohnAlbinThank you for reporting this issue! Sorry about the problems.
I've added a change notice so others gain from the testing you did. :-) https://drupal.org/node/2058111
Comment #14
erikphanson CreditAttribution: erikphanson commentedYeah, once the misc.css is included everything is good to go. I guess I didn't expect to have something that was being styled by the core have to be manually moved into my sub-theme to get it to work. Again, probably because I'm new.
I read through the upgrade notes and didn't see anything that explicitly says 'Hey, we bumped the responsibility of the display of messages over to the sub-theme, make sure you update the styles or grab them from misc.css in the new STARTERKIT". That would have been super helpful and at least communicated that the intent was to remove the core styling on purpose.
After all this, it seems this is a feature of the upgrade and not a bug, just the communication of the removal made it seem like a bug?
Comment #15
JohnAlbinNo, really. It's a bug. :-) See my comment #8.
The intent was only to remove it from new sub-themes, not existing ones. 7.x-5.4 will fix this bug!
Comment #16
JohnAlbin