After installing this module and doing some basic config, I get a 502 Bad Gateway error when loading the site. This is the error report I get:

AssertionError: Cannot load the "menu_svg_icons_icon_set_menu" entity with NULL ID. in assert() (line 249 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php)

I tracked this down to a line in the module file that is not checking the menu_name variable properly. Looks like some system menus don't include that value.

Patch coming shortly.

CommentFileSizeAuthor
#2 check-menu-name-variable-3122087-1.patch757 bytesmegan_m

Comments

megan_m created an issue. See original summary.

megan_m’s picture

StatusFileSize
new757 bytes

Here is a patch

AndersNielsen’s picture

@megan_m
Thank you for the patch.

Can you elaborate on what system menus are causing the problem, or how to replicate? - on a clean (umami) install I can not replicate the problem.

With your patch the functionality will essentially be disabled for those menus. That is obviously better than an error, but sort of defeats the purpose of the module. I am wondering if there might be a deeper problem that needs to be looked into?

AndersNielsen’s picture

Status: Active » Closed (duplicate)

I am marking this as duplicate of https://www.drupal.org/project/menu_svg_icons/issues/3099361 (applied to dev branch)