CSS is Being Mysteriously Called from Tools Directory After Upgrading to 4.2!

Permalink 1 user found helpful
I have a very bizarre situation that has me perplexed beyond normal sanity!!

I have a client's site who is hosted with Yahoo! (UGG!!). I was building it on 4.1.1, but then deleted most files / folders. Then, I installed 4.2 (this time with a new database). I then re-installed the theme. Here's where it gets weird: only half the styling is working properly - some is not.

When I go to check the source code, it is telling me that the the css files are being called like this:

<link rel="stylesheet" media="screen" type="text/css" href="/index.php/tools/css/themes/social_media/css/main.css" />


HOWEVER, this is NOT the same as what I have in the header.php for my theme. My theme is located in the packages directory, which is where the css files are. Here is what I have in my header.php file:

<link rel="stylesheet" media="screen" type="text/css" href="<?php  echo $this->getStyleSheet('css/main.css')?>" />


NOTE: Yahoo! hosting does not allow for .htaccess files, so I suspect that this may somehow be causing it? What do you think?

How do I fix it?

PineCreativeLabs
 
jordanlev replied on at Permalink Reply
jordanlev
I think this might just be a coincidence that you're noticing it now, and not specific to the 5.4.2 release.

When you use the $this->getStyleSheet() function, Concrete5 actually does some processing on the file (mostly to accommodate style customizations that end-users can perform via the dashboard) and serves it from a different location than where the file actually lives.

If you aren't using any customizable styles in your theme, you're better off using this alternative method for including your stylesheets which is faster and less error-prone:
<link rel="stylesheet" media="screen" type="text/css" href="<?php  echo $this->getThemePath(); ?>/css/main.css" />
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
Nope, that didn't fix it - made it worse! Although it now calls from the correct location, even fewer classes actually render!

I tried reverting back to what I had before, and most everything shows, save a few things.