Page 1 of 1

[Solved] {stylesheet} tag not expanded after upgrade from 0.13 to 1.5.1

Posted: Tue Dec 30, 2008 11:28 pm
by martin42
Upgrading from 0.13 to 1.5.1 on a test box (MacOS X Leopard, PostgreSQL, EnterpriseDB ApachePHP).

The pages, images and news articles are all OK, but the {stylesheet} tag returns nothing (empty string) so the site looks messy.
No error messages in PHP Log or PostgreSQL Log.
In "Content"/"Pages", the pages still have templates attached.
In "Layout"/"Templates", the templates still look OK: content area and stylesheet are filled in.

The template content area reads:
   
      ...
    {stylesheet}
   


On the old site, {stylesheet}  expands to

But on the new site, {stylesheet} expands to nothing :-[

Also, if I edit the template and change {stylesheet} to by hand, the page still doesn't render because http://localhost/stylesheet.php?templateid=21 returns 0 bytes of data.  :(

If I set $config['debug'] = true in config.php, then I can see this SQL query:

    SELECT template_id, template_name, template_content, stylesheet, encoding, active, default_template, modified_date FROM cms_templates WHERE template_id = '21'

... which works OK if I execute it at the SQL command console.

I've tried $config['old_stylesheet'] both true and false in config.php.

Has something very important changed with templates & stylesheets in the last few releases?  ???

Thanks for any pointers!

- Martin.

Re: {stylesheet} tag not expanded after upgrade from 0.13 to 1.5.1

Posted: Tue Dec 30, 2008 11:49 pm
by reneh
Has something very important changed with templates & stylesheets in the last few releases?
???
few releases! 0.12 is 2.5 years old man!

Re: {stylesheet} tag not expanded after upgrade from 0.13 to 1.5.1

Posted: Wed Dec 31, 2008 12:31 am
by martin42
Well, back in May, I tested an upgrade from 0.13 to 1.2.5 without seeing this problem, so I wonder whether there's been a design change to templates & stylesheets since 1.2.5.

Re: {stylesheet} tag not expanded after upgrade from 0.13 to 1.5.1

Posted: Wed Dec 31, 2008 1:37 am
by Dr.CSS
The {stylesheet} is still in the latest ver., but you have to check and make sure you still have stylesheets attached to the template/s, and do you have the {metadata} tag in the , I always put it at the top...

Re: [Solved] {stylesheet} tag not expanded after upgrade from 0.13 to 1.5.1

Posted: Wed Dec 31, 2008 12:07 pm
by martin42
Well, still slightly confused, but I have a workaround now...

1. Under "Layout / Templates", edit each template. 

2. Cut out the text from the "Stylesheet" edit box to the clipboard and press Apply.   (Stylesheet edit box should now be empty).

3. Press the "CSS" button (next to Apply), and create a new standalone stylesheet by pasting from the clipboard.

This makes the {stylesheet} tag work again!  The only other complication was that the CSSMenu part of the stylesheet had gone, but that's easily restored from the old site.

Cheers!

- Martin.