Full Menu Flash

Created on 23 June 2023, over 1 year ago

I'm not sure if there was a recent update that I picked up, or what the cause was, but in the last 24 hours or less, I've noticed that the Admin Toolbar is doing a full-screen flash of the entire menu, anytime I change from one page to another, either via the Admin Toolbar or just via the site's navbar. It is the Admin Toolbar that is flashing on the screen (see attachment) and if I uninstall the Admin Toolbar, the issue stops, and as soon as I reinstall it, it returns. I've tried even just uninstalling the sub-components of Admin Toolbar, the issue seems to be related to the base module. I have tried clearing caches, I have tried changing themes, I have tried different browsers, I have tried turning caching/aggregation on/off, I have tried power cycling my computer, but the issue persists.

🐛 Bug report
Status

Active

Version

3.4

Component

Code

Created by

🇺🇸United States BEGRAFX Laconia, New Hampshire

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

Merge Requests

Comments & Activities

  • Issue created by @BEGRAFX
  • 🇧🇪Belgium gillesv

    Can confirm; I'm experiencing the same issue. Have you updated to Drupal 10.1? I think it started happening after the update.

  • 🇺🇸United States BEGRAFX Laconia, New Hampshire

    Yes, 10.1.0

  • 🇺🇸United States stevieegee

    Happened after 10.1.0 upgrade on all my sites

  • 🇺🇸United States bvoynick

    I have also noticed this following an upgrade to 10.1.0. Don't recall seeing it prior to 10.1.x.

  • 🇩🇪Germany sense-design Münster

    Yes, related to 10.1 update. 10.0.x did not have this appearance.

  • 🇩🇰Denmark flabel

    It might be because https://www.drupal.org/project/drupal/issues/2998451 🐛 Toolbar tray rendering can result "flickering" resizing of content area to accommodate open trays Fixed landed in Drupal 10.1 with this commit https://git.drupalcode.org/project/drupal/-/commit/34b0bcd.

  • 🇺🇸United States BEGRAFX Laconia, New Hampshire

    @flabel, I don't think that this is the same thing as what you're referring to. Looking at the examples shown in the ~/drupal/issues/2998451, it shows a brief (as the title describes) flicker, what we're talking about here is a full 1 to 2 second flash of the content of the Admin Toolbar. And, as I say above, if I uninstall the Admin Toolbar module it goes away. While the example showing in the issue you quote doesn't appear to be using the Admin Toolbar module.

  • 🇩🇰Denmark flabel

    @BEGRAFX The commit changes css and js for the core toolbar module. So while the issue in core does not seem like the same issue as this one the changes could be reason this issue has arisen. Not sure but something changed in Drupal 10.1.

  • 🇬🇧United Kingdom andy_w

    One possible solution in light of the inline JS being used to prevent this problem in the toolbar (admittedly not a nice solution) would be to use a similarly unpleasant inline css solution to prevent that initial flash of menu.

    I offer this merely to see if it sparks an alternative solution, I will continue to try to find a better solution when I can find a bit more time.

  • 🇺🇸United States kevinfunk

    @andy_w, thanks for providing a possible solution.
    When testing I got the error Error: Class "Markup" not found in admin_toolbar_page_attachments() (line 99 of /var/www/html/docroot/modules/contrib/admin_toolbar/admin_toolbar.module). Adding use Drupal\Core\Render\Markup; allowed me to test your solution. It does work and I'm happy to use it until a better solution is provided. I can create an updated patch if you don't get to it before me :)

  • 🇬🇧United Kingdom andy_w

    Sorry about that, a very good reason not to copy & paste a solution into another file :facepalm

  • 🇺🇸United States kevinfunk

    Removes the extra return after the use statement.

  • 🇭🇺Hungary nagy.balint

    Thanks!
    It works for me.

  • 🇺🇸United States RyanCMcConnell

    The patch in #14 works for me! Thank you!

  • Status changed to Needs review over 1 year ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update over 1 year ago
    16 pass, 2 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    17 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update over 1 year ago
    16 pass, 2 fail
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States BEGRAFX Laconia, New Hampshire

    I've installed a local "Testing Sandbox" project using DDEV, and as always, installed Admin Toolbar. I'm not seeing the "flash" that I had been, but I do notice that Admin Toolbar can be "changed" based on the active theme. I used a theme that I wanted to check out, and I found this chunky, ugly mess (See Example 1). I checked the other project that prompted me to open this issue initially, and it now seems to be working well. I didn't notice it, but I presume that an update added the patched information above. I came back to the sandbox project, and changed to another theme, and it seems to work fine (See Example 2). I switch to the "Olivero" theme, and likewise, the toolbar works fine. I'll be making the maintainers of the problematic theme aware of this, but thought I'd share it here as well. As I presume that the new issue I'm seeing relates to the one theme, I'm happy. One of my "go-to" modules seems to be working well again.

  • First commit to issue fork.
  • Yeah, this needs some work. With 14 applied, the dropdowns in mobile don't expand.

  • 🇮🇳India Tirupati_Singh

    Hi, I tried replicating the issue but I'm not getting any Full Menu Flash issue. I've checked for the issue on other themes as well but didn't see any menu flash at all. I've also tried installing/uninstalling the module but didn't see the issue. Attaching screenshots for reference.

    Test on:
    Drupal 10.1.0
    Admin toolbar 3.4.1
    Theme: Gin, Claro, Olivero

  • 🇬🇧United Kingdom darren.fisher

    I can confirm that the patch in #14 no longer applies on 3.5.0 but I'm also no longer seeing the full menu flash issue.

    I'd suggest that this issue could be closed if others are reporting the same and another issue could be opened regarding the issues raised in #19 as that feels like a separate problem?

  • Hi,

    I agree that patch #14 no longer works on the newer version. However, we are still getting the same error message even after updating the module to 3.5.
    [07-Aug-2024 15:51:01 UTC] Uncaught PHP Exception Error: "Class "Markup" not found" at /code/docroot/modules/contrib/admin_toolbar/admin_toolbar.module line 100

    I have to update patch #14 to work on our site.

    Test on:
    Drupal core: 10.2.7
    admin_toolbar: 3.5.0
    PHP: 8.1

  • 🇩🇪Germany sense-design Münster

    Getting the same error "Markup" error as mentioned in #24.

  • Status changed to Needs review 6 months ago
  • 🇺🇸United States mlncn Minneapolis, MN, USA
  • 🇬🇧United Kingdom daniel.j

    daniel.j made their first commit to this issue’s fork.

  • Pipeline finished with Failed
    5 months ago
    Total: 357s
    #311740
  • 🇬🇧United Kingdom daniel.j

    Just encountered patch #14 not applying when upgrading to the latest version of admin_toolbar.

    I've updated the fork with upstream changes, re-rolled the patch and openned a MR.

    I can confirm that the patch in #14 no longer applies on 3.5.0 but I'm also no longer seeing the full menu flash issue.

    I have not been able to confirm that the issue is still present or not. Has any one else experienced the issue recently / can replicate it one the latest version?

  • Pipeline finished with Failed
    5 months ago
    Total: 340s
    #311918
  • 🇩🇪Germany sense-design Münster

    I can also confirm that there is no flashing with 3.5.1.

  • Hey,

    I have tested version 3.5.1 (3.x-dev) on Drupal 10 and did not encounter any flashing issues with the menu. I also tested it by navigating between pages and using different themes on my site, but the issue did not occur. The functionality of admin toolbar is working fine.

    For better clarity, I have attached a screenshot. Please let me know if you need any further details.

    Thanks!

  • 🇬🇧United Kingdom daniel.j
Production build 0.71.5 2024