Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm developing the master page for my company's intranet. I've read that this html will link all default and custom css files.

<sharepoint:csslink runat="server" version="4" />

I get back what is expected but the custom link ends up returning a 404 error. This is the resulting html from firebug.

<link href="/_layout/pipeline/masterStyle.css" type="text/css" rel="stylesheet">
404 NOT FOUND
</link>
<link href="/_layouts/1033/styles/Themable/corev4.css?rev=iIikGkMuXBs8CWzKDAyjsQ%3D%3D" type="text/css" rel="stylesheet">

The url is wrong but I don't know what to change to get _layout -> _layouts I want to use:

<sharepoint:cssregistration id="master_style" name="/_layouts/pipeline/masterStyle.css" after="corev4.css" runat="server" />

When I do the code works but I still have a duplicate link with a 404 error.

<link href="/_layouts/1033/styles/Themable/layouts.css?rev=aTcoNUf8p1YiDzYCg3%2FLIw%3D%3D" type="text/css" rel="stylesheet">
<link href="/_layout/pipeline/masterStyle.css" type="text/css" rel="stylesheet">
404 NOT FOUND
</link>
<link href="/_layouts/1033/styles/Themable/corev4.css?rev=iIikGkMuXBs8CWzKDAyjsQ%3D%3D" type="text/css" rel="stylesheet">
<link id="master_style" href="/_layouts/pipeline/masterStyle.css" type="text/css" rel="stylesheet">

I've tried to use the mighty google but most articles only show how to get to this point. I have not been able to find another person that has encountered this. Anyone know how I prevent cssLink from returning custom css links? or where the broken link comes from?

share|improve this question

closed as too localized by SPDoctor Oct 12 '12 at 11:03

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Have you added this line manually on the masterpage "<link href="/_layout/pipeline/masterStyle.css" type="text/css" rel="stylesheet"> –  Arko D Jul 5 '12 at 7:31
    
@Moss Farmer I get the same results as I do when I use sharepoint:cssregistration. The problem is that the is no "layout" folder, its layouts with an s. I don't know where sharepoint is getting this url. –  user8543 Jul 5 '12 at 14:40
add comment

1 Answer 1

up vote 0 down vote accepted

Turns out that I'm the source of my own problems. I traced the error message and found that an application page I made was calling <sharepoint:cssregistration id="master_style" name="/_layout/pipeline/masterStyle.css" after="corev4.css" runat="server" />. Typo on my part, that was easily forgotten. Also, I found that the css file I put in the Layouts folder was not being deployed. I moved it to /_layouts/STYLES/, changed the cssregistration path and now it works perfectly.

share|improve this answer
    
Thanks for answering for posterity. –  RJ Cuthbertson Oct 12 '12 at 3:01
add comment