Is there a way to force the CSS to be recompiled? Currently, our process is to upload a new LESS file through FTP to the directory, and then just wait for LiveWhale to pick it up and recompile. Sometimes it seems to take a very long time, and as far as I can tell, it’s not a caching issue on the user end.
Hi there,
The short answer to your question is yes—from your web browser’s network inspector, if you locate the /live/resource/css/chain-of-filenames.css file that includes your rendered code, you can open that in a new browser tab and append ?refresh=1 to the end of it to force LW to re-render and cache it. You’ll see the cache date/time at the top of the file in a comment so you can see if it’s taken effect.
To go a bit deeper – LiveWhale should detect updates to the LESS files and auto-recompile, but a few things can make that slower:
(1) If you’re on your production site, you may be viewing web2, which can be ~60sec behind production in theme files. In a browser, you can use a plugin like ModHeader to send “lw-lb-target-node: web01” to always see the web1 node where you’re SFTPing to.
(2) Some SFTP programs seem to be able to update files without always “touching” the system last modified date, which can confuse LiveWhale’s auto-cache-clearing.
(3) Or, if you’re using a file with nested @import statements, sometimes a file change on an included LESS partial may not always trigger LiveWhale to re-render the parent file that includes it.
Hope this helps!
I will look into those options. Thank you so much!
Hi there. Sorry to re-open this, but I had a bit of time to try this out and noticed a couple of things. First, I’ve only been trying this on our dev server. I don’t know what the configuration for that looks like, but I can try and find out if needed.
So when I run a widget on a page, it will point to our main CSS file, “widgets.less”. This appears to be hosted at:
https://ourdevsite.com/live/resource/css/\livewhale\theme\global\styles\widgets.css
If I append the refresh parameter to the URL, it leads to a 404 at:
https://ourdevsite.com/live/resource/css//livewhale/theme/global/styles/widgets.css?refresh=1
If I instead go to this URL, I see an updated version of the CSS file, with the comment noting the correct time the refresh happened:
https://ourdevsite.com/live/resource/css/livewhale/theme/global/styles/widgets.css
The file that the widget is actually pointing to still shows the older time from before the refresh was triggered. Looking at the mixed use of forward and backslashes in the URLs, I’m guessing this is an issue with the filesystem of the dev server, or some configuration that needs changing. Can you shed a little more light on what’s happening here?
Hi there, thanks for the additional detail here, and sorry to hear it’s still giving you trouble. We’re not able to log into your dev (or production) servers to investigate issues here in the Forum, but I think this is a good case for you to please submit the Request Help Form with specific examples of actual URLs from your dev work, and an example of a file change you made via SFTP on dev that you’re not seeing showing up on the front-end (with a URL example)? Then our team can investigate and see if a hosting or LiveWhale issue is causing that delay. Thanks!
I am all of a sudden having this same problem today. I made some changes to an SCSS file yesterday and everything updated as expected. Now, all of a sudden, the changes I made yesterday are missing from the compiled CSS, and resaving the SCSS file is not causing the stylesheet to recompile. I tried appending ?refresh=1 to the stylesheet URL, but it also leads to a 404 as @omcnamar mentioned above.