No Stylesheet links after upgrade

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
pzh20
New Member
New Member
Posts: 2
Joined: Tue Nov 06, 2012 7:07 am

No Stylesheet links after upgrade

Post 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
uniqu3

Re: No Stylesheet links after upgrade

Post 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.
pzh20
New Member
New Member
Posts: 2
Joined: Tue Nov 06, 2012 7:07 am

Re: No Stylesheet links after upgrade

Post 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
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: No Stylesheet links after upgrade

Post 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.
Locked

Return to “[locked] Installation, Setup and Upgrade”