upgrades to 10.4.0 or 11.1.0 change layout to single column

Created on 22 December 2024, 7 months ago

Problem/Motivation

When I upgraded the site from 10.3.x to 10.4.0, the block layout turned into a single column when not logged in. While I was logged in, everything looked normal.

Thinking that maybe 10.4.0 was responsible, I restored the site from the backup (all looked normal again), then upgraded to 11.1.0. Now, single column layout was everywhere. On top of that, the main navigation menu is no longer horizontal when I log out. When logged in, drop down works fine.

I've upgraded Drupal many times, never had a problem like this before. I've tried clearing caches, updating db, clearing views cache, clearing browser cache, etc, none of that helped, it's very stubborn.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @milan.durovic
  • I wonder if this problem has something to do with an error in calculating breakpoints for layout? The screen width is 1680 px and the font size is 16px, so the width should be 1680/16 > 100 em, which is more than enough to apply the layout for the widest screen, ie. the one with multi-column display.

    I'm not familiar with where is the screen width computed and are CSS used to specify alternate layout options, or this is done in some Javascript file - I'm not familiar with theming at all, but I'm a computer professional, so with some guidance about where to look I might be able to understand where the problem is and maybe fix it.

    As I'm on Adaptivetheme 7.1.0 and I only upgraded the Drupal core, I guess the theme must be using something from Drupal, that no longer works as before. I checked the differences in core/modules/breakpoint between the working version and the one that's broken and I can't see any changes that would hint at the reason for this failure.

  • πŸ‡·πŸ‡ΊRussia urix

    This problem correlates with mine:
    https://www.drupal.org/project/at_theme/issues/3495066 πŸ› Update to Drupal 10.4.0 breaks responsive menu Active

  • Changed the priority to major, as it's holding back Drupal upgrades, either in 10.4.x line or 11.x line.

    Does anybody know if this project is still being maintained?

  • πŸ‡ΊπŸ‡ΈUnited States bsnodgrass

    We experienced the same issue and duplicated with 10.4.1, we reverted back to 10.3.11 which solved our problem.

    The error was the same as identified on https://www.drupal.org/project/at_theme/issues/3495066 πŸ› Update to Drupal 10.4.0 breaks responsive menu Active , we will post our followup on the other issue and relate these two.

    In our case we have another site using the AT Theme, this one is working correctly.

  • πŸ‡¦πŸ‡ΉAustria electric.larry Vienna

    Can you please check if the patch in #10 in issue #3498246 fixes the problem?

    https://www.drupal.org/project/adaptivetheme/issues/3498246#comment-1595... πŸ› Broken menu visualization for anonymous user since drupal 10.4 Active

  • First of all, thanks to everyone who contributing to fixing the bug - at least part of it. Namely, after upgrading the theme to the version 7.1.1, I was able to upgrade Drupal 10.3.x to 10.4.1 and:

    • the main navigation menu was no longer expanded in one column
    • the block layout had left & right sidebars, main area, etc - it all looked as before

    However, after upgrading Drupal to 11.1.2, the problem of the single column layout still remains. If I go to the admin menu, click on Appearance, then "block layout", then "demonstrate block regions", all regions are stacked on top of each other, in a single column. With Drupal 10.4.1, this does not happen.

    It feels like it's still some kind of a problem in determining browser window size or geometry, or maybe calculation of the breakpoint.

  • New insight: I just upgraded to Drupal 10.4.2 and the menu broke afterwards. Cleaning all caches resolved it. Maybe the built-in on-the-fly Javascript minification is the culprit?

  • Hi sd123,

    I cleared the Drupal caches, browser cache, did updatedb, the problem is still there with Drupal 11.1.2. Drupal 10.4.2 is fine, the upgrade to 7.1.1 fixed the problem.

  • Is anyone using Adaptive theme on Drupal 11? Are you experiencing the same issue? When I was doing my experimentation, AFTER upgrading to Drupal 11, I tried creating a BRAND NEW THEME from the base and even that theme had the same problem. So, it looks like it's not really a problem related to the upgrade, but more that the theme is not really compatible with Drupal 11, despite claiming to be Drupal 11 compatible.

    I know the maintenance is volunteer work, but this has been reported 2 months ago and the maintainer is silent. Makes me wonder if he's monitoring these forums at all.

  • ok, I got it working. I can confirm the patch does not work as intended with version 8.x-5.4. The recommended project version does not work well with Drupal 10.4.x.

    Shouldn't version 7.1.1 become the recommended branch? Or shouldn't the 8.x-5.4 branch also be fixed?

  • Hi sd123,

    that's excellent news! Can you please share the patch so that I can try it out?

  • Sorry milan, I was travelling last week and posted my comment in the wrong thread. I am using Drupal 10.4 and only with version 7.1.1 the broken menu is permanently fixed.

  • πŸ‡ΊπŸ‡ΈUnited States fkildoo Alexandria, VA

    I had a similar issue with another theme when updating to 10.4+ from 10.3+. My subtheme stylesheet was being read, but the base theme was dominant. It was the same issue for logged-in or anonymous users. The issue I had was related to the new change in Drupal 10.4 ordering assets by dependencies. See https://www.drupal.org/node/3473558 β†’ .

    To fix it, I edited my subtheme's libraries.yml file to add a weight to the CSS line to adjust the order relative to other assets.

    css/subtheme.css: {preprocess: false, weight: 1}

    I also added a negative weight for a dependent JS file. Warning: It is encouraged to use dependencies instead for JS files.

    assets/uswds/js/uswds.min.js: {weight: -1}

    It's worth a try to see if this helps with your issue here.

  • πŸ‡¨πŸ‡¦Canada pnijjar

    I have been hit with this problem too. I do not have a full solution but have a partial workaround.

    I am using

    • at_tool 3.1.2
    • at_core 7.1.1
    • PHP 8.3.17
    • Drupal core 11.1.7

    This is a Drupal 10 site that started using Adaptivetheme in D8.

    There are files in at_tool/at_theme_generator/starterkits/starterkit/styles/css/generated

    • STARTERKIT.layout.page.css
    • FLOAT.layout.page.css

    Taking the contents of either of these files and pasting it to the bottom of my custom.css makes the block layout come back. "Demonstrate block regions" as described in the original description is fixed as well.

    My guess is that the at_theme_generator code that is supposed to seed the layout files is not running properly. So far I have not found where that is supposed to happen in the code.

  • πŸ‡¨πŸ‡¦Canada pnijjar

    (Apologies if this is a repost. I tried commenting yesterday and nothing came through.)

    I have been hit with this problem too. I do not have a full solution but have a partial workaround.

    I am using

    • at_tool 3.1.2
    • at_core 7.1.1
    • PHP 8.3.17
    • Drupal core 11.1.7

    This is a Drupal 10 site that started using Adaptivetheme in D8.

    There are files in at_tool/at_theme_generator/starterkits/starterkit/styles/css/generated

    • STARTERKIT.layout.page.css
    • FLOAT.layout.page.css

    Taking the contents of either of these files and pasting it to the bottom of my custom.css makes the block layout come back. "Demonstrate block regions" as described in the original description is fixed as well.

    My guess is that the at_theme_generator code that is supposed to seed the layout files is not running properly. So far I have not found where that is supposed to happen in the code.

  • Thanks @fkildoo. I don't have libraries.yml in my Drupal installation, including themes.

    Whatever the problem was originally (as you said, introduced in Drupal 10.4) it was fixed with the later release. **BUT** the fix worked **ONLY** for Drupal 10.4. When I tried upgrading to Drupal 11, I got back the single column layout. Clearly, Drupal 11 changed something else which is not to liking of this theme.

    I think it's misleading to claim that the theme works on Drupal 11. I asked if anyone got it working on Drupal 11 and got zero responses. The theme maintainer is also unresponsive. I tried reaching out to him using direct email, no change. There is not much time left for Drupal 10 and I'd like to migrate to Drupal 11, but I can't because of this theme. The original maintainer of the theme also stopped the support and simply disappeared some years back. It's a pity, because the idea is really good, but maybe it's too complicated to maintain.

Production build 0.71.5 2024