Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Update for critical security issue in PHPMailer included in release Vanilla 2.3.1

CSS does not update after clearing cache

I copied the default theme contents and renamed the theme in about.php and its directory. I added custom.css and a style to change the background color in the header. Nothing changed. Then I copied a default.master.tpl file into a created views directory. The html changed, but not the CSS. I cleared the cache in Smarty/compile and in my browser. Still no change. (I deleted Smarty but then put directories back. Did I delete hidden files?)

Are there minimum parameters that must be set to override Vanilla's CSS? Could the .ini files in cache have something to do with this?

Currently, my site (ptsdcircle.com) shows a reference to a custom.css file iteration that isn't correct since I was trying to get the background color in the header to change, and that style change isn't anywhere currently in the theme's directory. I've corrected the style line from .head to #Head but the browser still shows .head. What am I missing?

Comments

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited September 13

    Please use the Plugin CSSEDIT to add your css changes. Also there is a browser extension for chrome called Reload CSS and that works great to force the browser to load the fresh file.

    .ini files are maps of where the files are located. You delete those , but do not delete Smarty ! only the .ini files. That helps but it may not resolve it if you are using some kind of caching system.

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    a) Are you sure you have used the correct path? It must be something like this: /themes/somename/design/custom.css
    b) Could it be your browser cache? If I'm in doubt, I visit my site with the private mode of my browser.

  • All of this worked fine in my sandbox. Could there be a vanilla vs garden parameter that is preventing my custom.css file from being read?

    @vrijvlinder Removing the .ini files did nothing. But using the CSSEdit plugin works. Thanks. However, that non-working iteration of my custom.css file still appears in the browser's editor console. @R_J I am able to choose my theme in the dashboard, so yes, it's in the correct path. I already emptied my browser's cache as mentioned above.

    I'd like to clean this up. If anyone can tell me where the browser is picking up old edits, that would be much appreciated.

  • All of this worked fine in my sandbox. Could there be a vanilla vs garden parameter that is preventing my custom.css file from being read?

    @vrijvlinder Removing the .ini files did nothing. But using the CSSEdit plugin works. Thanks. However, that non-working iteration of my custom.css file still appears in the browser's editor console. @R_J I am able to choose my theme in the dashboard, so yes, it's in the correct path. I already emptied my browser's cache as mentioned above.

    I'd like to clean this up. If anyone can tell me where the browser is picking up old edits, that would be much appreciated.

  • All of this worked fine in my sandbox. Could there be a vanilla vs garden parameter that is preventing my custom.css file from being read?

    @vrijvlinder Removing the .ini files did nothing. But using the CSSEdit plugin works. Thanks. However, that non-working iteration of my custom.css file still appears in the browser's editor console. @R_J I am able to choose my theme in the dashboard, so yes, it's in the correct path. I already emptied my browser's cache as mentioned above.

    I'd like to clean this up. If anyone can tell me where the browser is picking up old edits, that would be much appreciated.

  • It's not a browser cache issue, because when I view the site on a different browser (was using Firefox and just tried on Chrome) the old line edit is still there.

  • Seems there are hidden files in the Smarty directory. I ran unzip -o vanilla-core-2-3-1.zip and the old style has been cleared. Thanks, guys, for your suggestions.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    There are .ini files in the Smarty folder. There are no hidden files in Smarty folder. Only a compile folder with the .ini files

  • I take that back. The old style has returned after creating a new custom.css file. While the CSSedit plugin is helpful, this problem is not allowing me to build my theme files. Help?

  • mtrgrrlmtrgrrl New
    edited September 14

    Short of clearing Apache's cache and restarting the server, I made a copy of my theme files, renamed it, and applied the new theme name. Now it shows the correct custom.css lines and it's working without the CSSedit plugin.

    The hidden files in the cache directory are .gitkeep. Should have used ls -a before.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP
    edited September 14

    you don't need those files... if you downloaded the latest version from here, and you have git files, delete them. They should not be there and do not do shit on your install or anyone's for that matter...

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    @mtrgrrl said:
    All of this worked fine in my sandbox. Could there be a vanilla vs garden parameter that is preventing my custom.css file from being read?

    No.

    @mtrgrrl said:
    @R_J I am able to choose my theme in the dashboard, so yes, it's in the correct path.

    >
    No. In order to have a theme you can choose in the dashboard, you only need to have a "good" about.php. Everything else can be completely wrong, although I guess that having syntax errors in one of the theme files might be a show stopper.

    @mtrgrrl said:
    I'd like to clean this up. If anyone can tell me where the browser is picking up old edits, that would be much appreciated.

    If your browser loads an old version of your custom.css, a version that physically is not identical to the /design/custom.css file, you have a browser issue or your server is caching that file. It is no Vanilla issue.
    Restarting Apache might help, but you should consider finding out why that caching is happening.
    Have you made any changes to the .htaccess? You can create a rule how long static files should be cached by the server and that could be your problem here...

Sign In or Register to comment.