After update a module the menu icons disappear.

CommentFileSizeAuthor
#6 fix_icons_not_showing-1399516-6.patch546 bytesewills
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Luna Vulpo’s picture

If thing that is because in menu_icons.css in background-image is "public://" instead real url

a.menu-429, ul.links li.menu-429 a {
  background-image: url(/public://styles/ikonka/public/menu_icons/menu_icon_429.png);
  padding-right:103px;
  background-repeat: no-repeat;
  background-position: right;
  height: 103px;
}
acrollet’s picture

Hrmm,

I'm having trouble reproducing this issue - can you clear your caches and let me know if it remains the same? If so, please go to admin/config/media/file-system and let me know your Public file system setting?

thanks much.

Luna Vulpo’s picture

Version: 7.x-3.0-beta1 » 7.x-3.x-dev

I cleared cache bud it doesn't help.
I have in admin/config/media/file-system "sites/default/files"
I installed a dev version - same effect.

I workaround a problem adding in css file lines like this:

a a.menu-xxx, ul.links li.menu-xxx a {
  background-image: url(http://myWebSite.com/sites/default/files/styles/ikonka/public/menu_icons/menu_icon_xxx.png);
}

where xxx is nuber.

acrollet’s picture

What is the content of your file_public_path variable? (in the variables table, or use the command 'drush vget file_public_path')

thecandide’s picture

I have the same issue. My file_public_path variable is "s:19:"sites/default/files";" which should be correct. The workaround also fixes the issue for me. Could it be a problem with the the "public://"?

When I replace "public://" in "background-image: url(/public://styles/menu_icon/public/menu_icons/menu_icon_1040.jpg);" with "background-image: url(/sites/default/files/styles/menu_icon/public/menu_icons/menu_icon_1040.jpg);" it works fine.

Thank you for your time.

ewills’s picture

Status: Active » Needs review
FileSize
546 bytes

Yeah I have this issue too - the attached patch should fix it. Nice and easy - the public:// url just needed to be converted to a "proper" path using file_create_url()

acrollet’s picture

Status: Needs review » Closed (duplicate)

See #1407716: change to file API or rely on imagecache for the preferred resolution to this issue.

Hanno’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

Works for me as well. Re-opened this as this patch seems a good temporary solution. For sure we need to rethink the code as in #1407716: change to file API or rely on imagecache

acrollet’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Commited patch in #6 as part of http://drupalcode.org/project/menu_icons.git/commit/2a87da8, thanks!