Page 1 of 1

No Stylesheet links after upgrade

Posted: Tue Nov 06, 2012 7:16 am
by pzh20
Having never worked with CMSMS before, I have upgraded a site from 1.6 to 1.11 after 4 years of no maintenance.

The upgrade seemed to go ok, but afterwards the site has no links generated to the css stylesheets.

The before page source looks like;
.....
<meta name="google-site-verification" content="qLip4m0DVNI2xqqGpkGm1uU4EqSflQgRYngREd2-ryc" />

<link rel="stylesheet" type="text/css" media="screen" href="http://www.xxx.co.uk/stylesheet.php?css ... ype=screen" />
<link rel="stylesheet" type="text/css" href="http://www.xxx.co.uk/stylesheet.php?cssid=42" />
<link rel="stylesheet" type="text/css" media="print" href="http://www.xxx.co.uk/stylesheet.php?css ... type=print" />
<link rel="stylesheet" type="text/css" href="http://www.xxx.co.uk/stylesheet.php?cssid=43" />
<link rel="stylesheet" type="text/css" href="http://www.xxx.co.uk/stylesheet.php?cssid=44" />


<link rel="start" title="Home Page, shortcut key=1" href="http://www.xxx.co.uk/" />
<link rel="prev" title="Search" href="http://www.xxx.co.uk/index.php?page=search" />

...

The pagesource after the upgrade is;
...
<meta name="google-site-verification" content="qLip4m0DVNI2xqqGpkGm1uU4EqSflQgRYngREd2-ryc" />





<link rel="start" title="Home Page, shortcut key=1" href="http://www.yyy.co.uk/dev/xxx/" />
<link rel="prev" title="Search" href="http://www.yyy.co.uk/dev/xxx/index.php?page=search" />

I have checked the associations which seem to be in place and look the same before and after.

Any ideas?

Regards
Pete

Re: No Stylesheet links after upgrade

Posted: Tue Nov 06, 2012 7:22 am
by uniqu3
{stylesheet} tag was deprecated in 1.9.x Series and you should change that to {cms_stylesheet}.
It could be possible that after that, paths to background images in your stylesheet will be wrong as with {cms_stylesheet} the css file is saved in /tmp/cache folder therefor you should probably change the path to a background in your stylesheet to background: url([[uploads_url]]/PATH/TO/FOLDER/your-image.gif); where [[uploads_url]] would return "http://www.your-domain.com/uploads" assuming you have your layout images somewhere in /uploads folder.

Re: No Stylesheet links after upgrade

Posted: Tue Nov 06, 2012 8:02 am
by pzh20
Thanks uniqu3,

I have
{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
{* Change lang="en" to the language of your site *}

<head>

<title>{sitename} - {title}</title>
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{cms_stylesheet}
{* This is how all the stylesheets attached to this template are linked to *}

{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}
{* Relational links for interconnections between pages, good for accessibility and Search Engine Optmization *}

</head>

at the front of all templates, I think it's ok.

Regards
Pete

Re: No Stylesheet links after upgrade

Posted: Thu Nov 15, 2012 5:18 pm
by paulbaker
Do you definitely have a stylesheet attached to your template?

Layout -> Templates. Click the Attach stylesheets logo by the template(s) you are using. Any stylesheets attached will be listed.