Toolbar alter hook overwrites pre render callbacks completely

Created on 20 December 2022, almost 2 years ago
Updated 3 November 2023, about 1 year ago

Problem/Motivation

The module has hook_toolbar_alter() that overwrites pre_render callback to ['administration']['tray']['toolbar_administration'] instead of adding it to the list of already defined callbacks. This means that all the hook executions that were done by other modules before gin_toolbar do not have any effect on the toolbar, because they are removed.

Steps to reproduce

I believe this was done to change the order of the elements in the menu that is mentioned in this issue https://www.drupal.org/project/gin_toolbar/issues/3222799 πŸ› Order of toolbar menu items is changed after updating to 1.0.0-beta18 RTBC , but it also makes it impossible for the modules with the name starting with letters a,b,c,d,e,f and g (if second letter is before "i") to alter the toolbar without implementing hook_module_implements_alter() and moving their hook_toolbar_alter() to the end of the list.

Proposed resolution

So if the problem is in admin_toolbar_toolbar_alter() maybe it is better just to remove it with the same
hook_module_implements_alter() inside gin_toolbar module. Or at least mention this somewhere in Readme or on documentation page, that the module needs some code changes to alter the toolbar after gin toolbar.

Remaining tasks

To be defined.

User interface changes

The changes to toolbar from other modules will be visible.

API changes

None.

Data model changes

None

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany a.dmitriiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024