Closed (fixed)
Project:
Admin Toolbar
Version:
3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2022 at 23:30 UTC
Updated:
12 May 2023 at 13:29 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #2
evanjenkins commentedThis patch seemed to do the trick for me.
Comment #3
weseze commentedWe seem to be experiencing the same issue, although the process of reproducing it is very unclear for us... Nothing to do with views/homepage.
Seem to occur regularly for QA people when doing responsive testing in Firefox, switching between devices in the developer console can sometimes cause this issue...
Clearing the Drupal cache is the only solution we have found so far.
Will try the patch and report back if it helps for our QA people.
Comment #4
dave reidComment #5
jrearickFeels like it might be an internal Drupal cacheing issue? Has anyone been able to figure out how to reliably replicate the issue and document those steps so the fix can be verified?
Comment #6
dave reidI wonder if this is a caching issue, that the toolbar generally doesn't get cached per page, but adding of local tasks, we need to ensure that it *does* get cached per page.
Comment #8
dave reidI was also testing out #3323763: Local Tasks menu is shown even when the tray is empty and I couldn't find a way to make this work with the render placeholder, so I ended up ripping out the lazy caching and just outputting the local tasks directly, but this time with proper cache metadata and contexts. My testing so far with all caching turned on seems to be working and solving both issues.
Comment #9
dave reidPatch for composer workflows against 3.x.
Comment #10
matthandConfirming the patch in comment 9 applies clean from composer.json and resolves this issue. It also fixes the related issue "Local Tasks menu is shown even when the tray is empty". Moving to status "Reviewed & tested by the community".
Comment #11
dave reidI think I was able to narrow down an instance where after a cache clear/invalidation, if the first page I loaded didn't have any local tasks, then subsequent page loads after that would load the cached toolbar without any local tasks even though the page had changed and the local tasks should be visible. I couldn't reliably reproduce this however but this was the one instance I saw.
Comment #14
adriancidThanks