Closed (fixed)
Project:
Navigation Extra
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2026 at 16:16 UTC
Updated:
23 Mar 2026 at 15:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
tim-dielsComment #4
tim-dielsI had another view on this and it would be awesome to actually let the user choose an icon and fall back to a default when no icon is selected. I adjusted the code.
Comment #5
dtfabio commentedComment #6
dtfabio commentedHi Tim,
I tested the code change on three different Drupal instances.
Drupal core versions: 10.3.14, 10.6.3 and 11.3.3
PHP versions: 8.3.30 (10.3) and 8.4.18 for the newer core versions.
Database version: MariaDB 11.8.6
After adding the patch, I received the following error on all three (when UI icons module is not enabled on the site):
Because my configuration does not contain a key "icon" (dump via xdebug):
After removing and re-adding the block with UI Icons module enabled, I get the following configuration:
The problem does reappear after disabling the UI Icons module and adding the block again, so I think that around the icons part in the build, there will likely also needs to be a check to see if the module is enabled before the configuration is retrieved.
I will test choosing an icon now, but wanted to pass on this information already.
Greetings,
Fabio
Comment #7
dtfabio commentedHi Tim,
I have tested selecting an icon and this works well. The only comment I have is that the icons in the autocomplete selection list sometimes take up a lot of space.
I think it might be useful to specify a fixed size here so that the icons are always displayed in the same way.
Also noticed that even on a site where UI Icons was already enabled, the error I mentioned earlier occurs, given that the block already existed before the patch was added. So I don't know if my previously mentioned fix will cover the entire load.
Greetings,
Fabio
Comment #8
tim-dielsI'll look into this.
Comment #9
tim-dielsThe icon_autocomplete is not something that is done by this module. It is a good find, but we have no impact on this.
I adjusted what is needed here. So can you please retest?
Comment #10
dtfabio commentedComment #11
dtfabio commentedHi Tim,
After retesting the adjustments, the array errors are gone, but I still get the following error on the Drupal 10 site:
Allowing icon selection means that the code will not be compatible with both 10.x and 11.x. So perhaps you could split the functionality and, for now, just include the icon and we can create a follow-up issue to allow icon selection?
Greetings,
Fabio
Comment #12
dtfabio commentedI have created a ticket for this: https://www.drupal.org/project/navigation_extra/issues/3577554
Comment #14
tim-diels