Created on 23 June 2023, over 1 year ago
Updated 12 September 2024, 3 months 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

Needs review

Version

3.0

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 States kevinfunk
  • ๐Ÿ‡ฌ๐Ÿ‡ง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
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States RyanCMcConnell
  • 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 3 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
    2 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
    2 months ago
    Total: 340s
    #311918
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany sense-design Mรผnster

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

Production build 0.71.5 2024