Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When you save a admin/structure/menu/item/%/edit
page, Menu Icons generates the CSS based on the menu-icons-css-item.tpl.php
file in your theme if you have one. But when you save node/%/edit
, it generates it from the one in the module folder, regardless of whether you have one in your theme. The result is that whenever you save a node with a menu link, all your custom-CSS icons disappear completely.
Comments
Comment #1
Lanny Heidbreder CreditAttribution: Lanny Heidbreder commentedRealized that this is because I use the admin theme for node edit pages, and the admin theme didn't have my template file in it.
Not sure what the right solution here is. Seems like something fundamentally wrong with the logic used to generate the CSS. I may come back to this later, but for now I'm going to copy my template file into my admin theme as a quick fix.
Comment #2
mshepherd CreditAttribution: mshepherd commentedNicely spotted @75th Trombone. This was driving me mad. Simple workaround, but it does suggest a problem in the logic somewhere. Cheers.
Comment #3
demonde CreditAttribution: demonde commented+1
Comment #4
fox mulder CreditAttribution: fox mulder commentedHi all!
I ran into this ( or something similar ) problem today. My theme overrides menu_icons_css_item.tpl.php and everything worked well, but today the menu_icons.css was regenerated from sites/all/contrib/menu_icons/menu_icons_css_item.tpl.php...
I found this issue and made some tests, but I can not reproduce the problem.
First of all: clearing all caches solved the problem for me.
I tried to create a node of node type that can provide menu link ( edit page contains menu icon settings and I filled it in ), but it did not save menu icon settings ( another problem? ) and the problem did not came out ( I'm using admin theme on node/edit pages too ).
Comment #5
fox mulder CreditAttribution: fox mulder commentedmaybe related: https://www.drupal.org/node/953456