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.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

eme created an issue. See original summary.

adriancid’s picture

eme’s picture

Yes 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.

RumyanaRuseva’s picture

The 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.

adriancid’s picture

@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.

adriancid’s picture

@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.

  • adriancid committed f6db0f7 on 8.x-1.x
    Issue #2925501 by eme, adriancid, RumyanaRuseva: Menu does not take...

adriancid credited AlexJ.

adriancid’s picture

eme’s picture

Hi ! I just did some tests yesterday and indeed evrything leads to the lazyloading. I agree that we need to revert.

AlexJ’s picture

eme 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.

adriancid’s picture

Thanks @AlexJ, and the others issues that you reported are solved too?

AlexJ’s picture

@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..

adriancid credited demonde.

adriancid’s picture

adriancid credited criscom.

adriancid credited geYdes.

adriancid credited hudri.

adriancid’s picture

Sophie.SK’s picture

Thanks 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 :)

adriancid’s picture

Thanks @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!

adriancid credited dtv_rb.

adriancid credited lamp5.

adriancid credited pmuzyk.

adriancid credited rwam.

adriancid’s picture

Issue summary: View changes
Related issues: +#2925145: Notice: Undefined index: url

The commit made here solve too this issue:

#2925145: Notice: Undefined index: url

adriancid credited finne.

adriancid credited sylus.

adriancid’s picture

adriancid’s picture

Issue summary: View changes
eme’s picture

Status: Active » Fixed

Seems that everything is ok or has its own issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

UnsettlingTrend’s picture

I'm seeing this issue again myself. Could it be a Drupal 8.5 issue?

zlatev’s picture

I 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?