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.
Problem/Motivation
The menu links coming from Admin Toolbar Extra Tools are not dynamically updated.
For example : create a content type : you will not see the administration links unless you flush the caches. Same for any change (add / delete any entity for example).
The following issues are solved with the patch provided here:
#2926446: Menu on side loses dropdown
#2925742: Update leads to WSOD
#2926101: Error after updating to 8.x-1.21
#2925145: Notice: Undefined index: url
#2923466: Inconsistent dropdown behaviour with admin menu
Proposed resolution
Flush cache on menu change.
Comments
Comment #2
adriancidHi @eme, this is related to #2899392: user_hook_toolbar() makes all pages uncacheable
Comment #3
eme CreditAttribution: eme commentedYes indeed. But now it is cachable it seems. Is it the 8.4 that has changed this [EDIT : indeed the 1.20 has the same issue] ? The issue you mentioned is out of date it seems. On the contrary, now we have to figure out how to flush caches. For me it is just about hooking the insert and delete hooks on entity type creation / deletion, menu creation / deletion and role creation / deletion. The rest is just linked to modules & themes and therefore do not raise any issue.
Comment #4
RumyanaRuseva CreditAttribution: RumyanaRuseva at FFW commentedThe caching issue does not affect only items from Admin Toolbar Extra Tools, it applies to manually adding and deleting menu items from the Administration menu as well.
After deleting a menu item when the admin_toolbar module is enabled, the whole site breaks with the error Query condition 'menu_link_content.uuid IN ()' cannot be empty until cache is cleared manually.
P.S. It seems that the issue does not occur if I disable the menu items - they get removed from the admin toolbar menu immediately. Deleting disabled menu items does not cause an error.
Comment #5
adriancid@eme I think that if we revert the lazzy builder we will fix a lots of problems. And we can included when is really working fine. Is weird that I can't reproduce many issues that have been created after the 1.21 release. This is the only that I can confirm exists related to the "random" toolbar problems.
Comment #6
adriancid@eme it seems that we have many problems with the lazzy builder (and this is the only that I can reproduce, so is difficult to find the solution for something that always works in your environment) I think that is better to revert for the moment the lazzy builder and wait to see if @finne or another user can find the final solution, I don't know what do you think about this?
For the moment I will revert and commit to dev to see if the problem is solved for the other issues, I'll notice in the other issue to see the users feedback.
Comment #11
adriancidComment #12
eme CreditAttribution: eme commentedHi ! I just did some tests yesterday and indeed evrything leads to the lazyloading. I agree that we need to revert.
Comment #13
AlexJ CreditAttribution: AlexJ as a volunteer commentedeme and adriancid
Tested admin_toolbar-dev-8.x-1.22 - With the admin menu is put to the side it keeps its drop down facilities.
Thanks for your work, its a great module.
Comment #14
adriancidThanks @AlexJ, and the others issues that you reported are solved too?
Comment #15
AlexJ CreditAttribution: AlexJ as a volunteer commented@adriancid. Running - Machine name: admin_toolbar - Version: 8.x-1.21+8-dev - and its all good, when I maximise ckeditor, no obscuring occurs. Thanks..
Comment #17
adriancidFor the moment this solve:
#2926446: Menu on side loses dropdown
#2925742: Update leads to WSOD
Comment #23
adriancidThis is solved too:
#2926101: Error after updating to 8.x-1.21
Comment #24
Sophie.SKThanks for this fix! We've tried the latest dev and it works well. I'm pleased that I can use the sidebar menu again!
The user TamCalderwood was actually the one who did the testing for us at Microserve - I mention so she gets the credit she deserves :)
Comment #26
adriancidThanks @Sophie.SK adding credit, I think that we will release a new version this week, we are waiting for the review of:
#2926844: admin_toolbar_tools is not creating links on Appearance, Extend and People when installed.
#2929053: admin_toolbar.js should use Drupal behaviors
If somebody can help us this will be great!
Comment #31
adriancidThe commit made here solve too this issue:
#2925145: Notice: Undefined index: url
Comment #35
adriancidThis issue solve too #2923466: Inconsistent dropdown behaviour with admin menu
Comment #36
adriancidComment #37
eme CreditAttribution: eme commentedSeems that everything is ok or has its own issue.
Comment #39
UnsettlingTrendI'm seeing this issue again myself. Could it be a Drupal 8.5 issue?
Comment #40
zlatev CreditAttribution: zlatev commentedI experience the same issue again with latest 1.25 version.
If admin_toolbar is uninstalled links are working flawlessly. I haven't looked deeper yet but it seems like $menu_tree which is loaded from the service container contains links which are no longer existing. Anyone else with the same problem?