Edited.
Drush CC (Clear Cache) will process the CSS template and overwrite the current menu_icons.css, but it does not create the background image $path correctly. It uses "Default" where "Domain.com" should be. Using the URI option with drush will process the path correctly. "drush cc all -l http://domain.com"
Comments
Comment #1
whthat commentedTitle Update - Narrowed the scope of the issue.
Comment #2
kevinquillen commentedConfirmed.
Is there any particular reason why the CSS generates a full URL to the image instead of a relative path?
Comment #3
iterator commentedFinally it´s a drush issue http://drupal.org/node/743368
Anyway, maybe a relative path would be better.
Comment #4
kevinquillen commentedLooks like that was closed/fixed? 2 years ago?
Comment #5
emilorol commentedHi,
I had a similar issue, please check http://drupal.org/node/1516326#comment-5919470 for a solution that work in my case.
Thank you,
Emil
Comment #6
steve.hartley commentedAnybody looking for a quick solution for this just add to your settings.php file the base_url for your site i.e
$base_url = 'http://local.example.com';Comment #7
kevinquillen commentedDoesn't that have unintended side effects on existing websites?
Comment #8
iterator commentedThe fix was adding a note to README.txt :)
The problem is:
If you clear the cache within your performance settings on your website everything will be fine.
You can use the "l" option with drush to avoid this issue:
drush cc all -l http://example.com//edit
In my opinion it would be better to use a relative path. In the function menu_icons_css_generate() the code for generating the $image_url currently is:
$image_url = file_create_url($image_path);This could be change to anything similar like:
$image_url = '/' . file_stream_wrapper_get_instance_by_uri($image_path)->getDirectoryPath() . '/' . file_uri_target($image_path);I don´t know if there is a shorter way to do that.
Comment #9
acrollet commentedClosing as a duplicate of #743368: $GLOBAL['base_url'] set to http://default - I've also added information to the README, see http://drupalcode.org/project/menu_icons.git/commit/ec20517
Comment #9.0
acrollet commentedModified Issue Description