- Issue created by @jurgenhaas
- Merge request !10737Issue #3496541 by jurgenhaas: admin-toolbar-wrapper: Uncaught TypeError:... β (Closed) created by jurgenhaas
- π·πΈSerbia finnsky
Thank you for fix. Actually it is interesting why toolbar js loaded for anonymous.
- π©πͺGermany jurgenhaas Gottmadingen
Actually it is interesting why toolbar js loaded for anonymous.
Yeah, that caught me by surprise too. I was trying to determine where this is coming from, but I wasn't able to find out. It looks like it comes from the NavigationLayout, however, that shouldn't be touched either.
- π«π·France Grimreaper France π«π·
Hi,
Thanks for the fix! I have the same problem on 10.4.
Here is a patch from the MR for Composer usage until it is merged.
- π·πΈSerbia finnsky
It still seems to me that in this task it is much more important to understand why the script is loaded in the wrong place than to fix the script directly. This is also a bug and a much more serious bug.
@grimreaper,
Maybe you have steps to reproduce? A list of third-party modules and some other details? - π«π·France Grimreaper France π«π·
I found my culprit...
https://git.drupalcode.org/project/navigation_extra_tools/-/blob/1.1.x/n...
/** * Implements hook_page_attachments(). */ function navigation_extra_tools_page_attachments(&$variables) { $variables['#attached']['library'][] = 'navigation_extra_tools/icon'; }
No check at all if the navigation is present or not.
I will create an issue on this project.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Left one comment on the MR, thanks
- π©πͺGermany jurgenhaas Gottmadingen
@grimreaper thanks for the tip in #8, turns out it was the same issue here. Linking to π Add library only if needed Active for others who may come along here.
Even if this is certainly an issue in contrib, the safeguard in the js file still seems to make sense.
- π«π·France nod_ Lille
Committed and pushed 554b7c600ad to 11.x and b5ccec7567d to 11.1.x and 07ae29edb49 to 10.5.x. Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.