Basically I have my folder set, module enabled, so I enter menu-item edit page, I check to "use menu icon" and whatever I do it is not working! When I upload a picture it is being renamed and uploaded to the set folder, but the icon is now showing up, and when I enter menu-item edit page again I see "use menu icon" unchecked... The default icon is also not working
My folder settings are: "/files/menu_icons" - the folder is created with 777 permissions, i put inside default icon and set it in settings, and when I upload custom picture it appears there as I wrote above...
Comments
Comment #1
acrollet commentedHi there,
I was unable to reproduce your issue. Please post exact steps to reproduce the problem, starting with a clean installation of Drupal 7. Screenshots of your configuration settings would probably also be helpful.
thanks,
Adrian
Comment #2
mxwitkowski commentedI am having the same problem as czaku. I have installed the module, can confirm that the icon configuration options can be set for a menu item and that images are being uploaded into the default directory in the public files directory. I have cleared site cache and am not able to get the icons to appear. I am running Drupal 7.12.
Comment #3
emilorol commentedHi,
I found the CSS background-image path to be the issue:
Thank you,
Emil
Comment #4
emilorol commentedHi,
I found the issue the module file in line:
I replace it with:
Thank you,
Emil
Comment #5
emilorol commentedHi,
The bug is still out there and using the fix I submitted will work until you clear the cache of the site and after that the image path stop been an absolute path to something like: http://default/sites/default/files/styles/menu_icon/public/menu_icons/me...
Thank you,
Emil
Comment #6
emilorol commentedHi,
The replacement code on #4 should be like this:
Comment #7
emilorol commentedHi,
After a couple more hours of code reviews and a lot of watchdogs I noticed that the problem is that when the cache is flush the $base_url in a regular drupal installation is http://default, so in my settings.php file I set my $base_url and the problem is now gone. I wonder if in the code below:
something can be added that will save the trouble of adding a value to $base_url in the settings file.
Thank you,
Emil
Comment #8
andyg5000#6 worked for me in 7.x-3.0-beta3
Comment #9
sukr_s commentedhad a the same issue, but didn't need either #4 or #6, the issue was the site's files folder was not writeable through the entire depth.
Comment #10
NIKS_Artreaktor commentedHello everyone.
I have the same problem -
"when I enter menu-item edit page again I see "use menu icon" unchecked."
The problem is that image generating, css creating. (even without patch #6)
But always "use menu icon" unchecked and css create ONLY for ONE last edited menu item.
Like this module, but it not working///
Comment #11
NIKS_Artreaktor commentedComment #12
emilorol commentedHi,
In this page (http://drupal.org/node/1437184) there are a couple of patches that solve the issue with the icons not showing or been removed after the cache is cleared using Drush.
Note: there are some servers out there with bad permissions configuration that will force you to set the icons and css folders permission to 777.
Comment #13
acrollet commentedClosing as a duplicate of #743368: $GLOBAL['base_url'] set to http://default - until a fix is committed there (if that happens), one may avoid this problem by using the "-l http://site.url/" option to drush, or (better yet set up drushrc.php)
Comment #14
abhaysaraf commentedI have edited menu_icons_css_item.tpl.php and now I can see the corresponding images-
Added a variable
'global $base_url'and updated'background-image'attribute value.Code is now looking somewhat like:
Comment #15
wirka commentedHi, does dev version have been updated?
Comment #16
codemode01 commented#6 worked for me.
In menu_icons.module, at line #517...
replace - $image_url = file_create_url($image_path);
with - $image_url = image_style_url($image_style, $source_uri);
Run cron > Edit menu item > Check 'Use an icon" > Enter path without the preceeding '/' > Working now
Thanks!
Comment #17
morybel commented#6 worked for me also,
Thank you.
Comment #18
antonior14 commentedSame issue for me too.
After loading image for menu item, it appear clear in the admin table, and menu item disappear, any DOM refered to img was added
I tried too to replace code as described by codemode01
Comment #19
emi_bcn commentedHi,
I have Drupal on a subdirectory. Only #14 worked for me.
Thanks @abhaysaraf !!
Comment #20
wescleyteixeira commentedI have Drupal on a subdirectory. Only #14 worked for me.
New uploaded images are showed only after cleaning the cache.
Thanks @abhaysaraf [2] !