• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: [solved] caching css ressources: 404 error
PostPosted: Mon May 15, 2017 3:56 pm 
Offline
Forum Members
Forum Members

Joined: Tue Jun 12, 2007 1:29 pm
Posts: 246
When editing and saving a css file in assets/css, all its linked ressources (img, fonts…) are being added tmp/cache/ to their paths, leading to 404 errors.
Am I doing something wrong or is it a bug?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: caching css ressources: 404 error
PostPosted: Mon May 15, 2017 4:03 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 7936
Location: Fernie British Columbia, Canada
CSS files are stored in assets/css OR in the database but the {cms_styleseet} call generates a file in tmp/cache and that's what the HTML stylesheet tag uses. This part has not changed in CMSMS 2.2.

Therefore, if using relative paths in the CSS they would be relative to tmp/cache.

Best is to use absolute paths. [[root_url]]/assets/images/foo.jpg etc. or to use paths relative to the root. i.e: /assets/images/foo.jpg (whatever works)... but [[root_url]]/assets/images/foo.jpg is recommended as it will definately remove any relative path issues.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: caching css ressources: 404 error
PostPosted: Mon May 15, 2017 4:15 pm 
Offline
Forum Members
Forum Members

Joined: Tue Jun 12, 2007 1:29 pm
Posts: 246
Oh yes, should have remembered this one. Actually, as I was using sass without {cms_stylesheet} for the last sites, I didn't have to use [[root_url]] in stylesheets anymore.
Now, I'm using sass with {cms_stylesheet} and the url parameter is a bit more complicated to find. Btw, I found it.

Thanks for the reply.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting