0

I've got a site collection which currently only has one web site (the root web). The styling comes in a Site level feature with a few modules to deploy the master page, the CSS, and other resources, and an event receiver to switch the master pages when the feature is activated/deactivated. This all works fine.

I've now added a publishing site to this site collection, and I want it to use the same styling. However, whenever I try to activate the styling feature on this new web, I get the following on-screen error:

Failed to instantiate file "MyStyles.css" from module "StyleSheets": The specified list does not exist.

and in the ULS I see

Not enough information to determine a list for module "StyleSheets". Assuming no list for this module.

Although this is a publishing site, the Style Library appears to be missing from the All Site Content view, but it does appear (although empty) when viewing the site in the designer. The publishing feature is active for the whole site collection, what have I missed?

1 Answer 1

0

Is the publishing feature enabled at the site collection level? A publishing site normally starts at the site collection level and that is also where the Style Library should live, which holds files that apply to all sites in the site collection.

A publishing site uses page layouts and other things that are also defined at the site collection level, not in the sub site. So turn on publishing at the site collection level and populate the Style Library in the root site.

Sub sites normally don't have Style Libraries. SharePoint Designer will show placeholders in the navigation for some sites. If you then click on these in SPD, the libraries will be created. This is a messy approach, though.

4
  • Thanks, the publishing feature is enabled at the site collection level. I can set the master page of my new site to be the same as that of the root site, but for some reason I'm not picking up the XSL Item Styles from the root site in the child site.
    – MorayM
    Commented Mar 20, 2014 at 15:39
  • Not picking up where? How do you reference the items?
    – teylyn
    Commented Mar 20, 2014 at 19:56
  • I've got a lot of CQWP item styles in an XSL file in the style library of the root site, but for some reason the child site isn't aware of them.
    – MorayM
    Commented Mar 21, 2014 at 10:43
  • Again: How do you reference the files in the style library? Are you using the correct link?
    – teylyn
    Commented Mar 22, 2014 at 4:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.