-1

I have a file for my homepage in the directory libraries/css/2017-06_Su****.css I'm making changes to the url path of where the background image is being pulled from and the path change is not taking changes. It's still the old path.

I tried cleaning cache, turned off caching and ran drush cc all

This is my css:

.banner-background{
 background:url(https://www.no******.org/images/homepage/2017/06/Summer2017_header_1170x470.jpg);
    }

I'm changing this to:

.banner-background{
            background:url(https://www.no******.org/images/homepage/2017/06/Summer2017_header_1170x470__.jpg);
    }

It keeps showing up as this below no matter what I do

.banner-background{
 background:url(https://www.no******.org/images/homepage/2017/06/Summer2017_header_1170x470.jpg);
    }

I'm wondering why when I modify my css in drupal 7 why the changes aren't being saved although all caching is turned off.

  • Have you try adding !important tag at the end of url.? and see if that takes effect? background:url('no******.org/images/homepage/2017/06/Summer2017_header_1170x470__.jpg') !important; it should work normally if you clear all caches from drush but seems like it's not the problem that you are having.. editing the correct file ? – danuddara Jul 10 '17 at 21:01
  • Have you also ruled out your browser cache by force reloading the page (Ctrl + F5). – Neograph734 Jul 10 '17 at 21:34
1

I had this problem too, nothing seemed to help. It turned out that the problem was that the page for which the css did not follow the changes was created by a custom plugin. That plugin has a method that returns an array that is used for rendering.

If not specified, caching is default on, and the cached css was always used. In my case specifying the cashing had immediate effect.

In function build (which returns the render data), I changed

    return array(
        '#markup' => "<div class='taxoblock'>REST HTML</div>",);

to

    return array(
        '#markup' => "<div class='taxoblock'>REST HTML</div>",
        '#cache'    => array (   'max-age'   => 0 ));
0

Have you tried going to "Home › Administration › Configuration › Development > Performance" and disabling "Aggregate and compress CSS files"? After doing it, refresh cache.

Regards

0

Use the Advanced CSS/JS Aggregation module and put it into development mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.