cacheing stylesheets with {cms_stylesheet} no longer working

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

cacheing stylesheets with {cms_stylesheet} no longer working

Post by uptoeleven »

Hi,

I have a lot of CMS Made Simple sites on my server which runs CentOs 5.5. Just did yum update. All the old CMSMS sites are fine but the new ones are having problems. Basically {cms_stylesheet} isn't working. When I view source the <link> tags that should load the css files are absent, when I look in tmp/cache (having cleared the cache) the css files are not being written.

I have checked file and directory ownership and permissions and these are set correctly. All other tags are running - I have Global Content Blocks that are presenting correctly, the menu is all there so Menu Manager is running but obviously without stylesheets things look a little bit 1994.

debug=true; in config.php isn't throwing up any errors, there's nothing in the error logs for php. I'm wondering if it's a smarty issue but it's a bit selective if it only fails for one usage of smarty and runs fine for all the others. Any ideas? I'm going to head in to the source code and see if everything's working but if anyone has any bright ideas or pointers I'd love to know.

Thanks

Simon
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

Re: cacheing stylesheets with {cms_stylesheet} no longer wor

Post by uptoeleven »

ok - the function to generate the stylesheets is definitely being called because I added

Code: Select all

$stylesheet="test";
to the line before

Code: Select all

return $stylesheet;
and it put the word test into the page.

It's not a smarty issue then.
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

Re: cacheing stylesheets with {cms_stylesheet} no longer wor

Post by uptoeleven »

$res = $db->GetArray($query, $qparms);

$res is null. $query and $qparms have values so I'm guessing the problem is here somewhere.
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

Re: cacheing stylesheets with {cms_stylesheet} no longer wor

Post by uptoeleven »

ok - the problem is caused by SQL:

the faulty version runs this query, where Array ( [0] => template [1] => 26 )

Code: Select all

SELECT DISTINCT A.css_id,A.css_name,A.css_text,A.modified_date, A.media_type,B.assoc_order FROM cms_css A LEFT JOIN cms_css_assoc B ON A.css_id = B.assoc_css_id WHERE B.assoc_type = ? AND B.assoc_to_id = ? ORDER BY B.assoc_order
whereas the version that is working runs this on the same array

Code: Select all

SELECT DISTINCT A.css_id,A.media_type,B.assoc_order FROM cms_css A, cms_css_assoc B WHERE A.css_id = B.assoc_css_id AND B.assoc_type = ? AND B.assoc_to_id = ? ORDER BY B.assoc_order
Array ( [0] => template [1] => 26 ) 
I will check that the yum update didn't do horrid things to MySQL - it certainly did last time...
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

Re: cacheing stylesheets with {cms_stylesheet} no longer wor

Post by uptoeleven »

looking at the tables in mysql:
Error

SQL query: Edit

SHOW FULL FIELDS FROM `cms_css` ;

MySQL said: Documentation
#1030 - Got error 28 from storage engine
not quite what I wanted to see :'(
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

Re: cacheing stylesheets with {cms_stylesheet} no longer wor

Post by uptoeleven »

huge file in root drive of the server - now deleted (having backed it up elsewhere) - rebooting, will see if this fixes it...
uptoeleven
Forum Members
Forum Members
Posts: 96
Joined: Sat Dec 04, 2004 10:30 pm
Location: London, England

[SOLVED] cachcing stylesheets with {cms_stylesheet} broken

Post by uptoeleven »

fixed - note to self - that is not a sensible place to store enormous files.
Post Reply

Return to “CMSMS Core”