1

This question is in regards to SharePoint 2010. It would appear that when a page renders under a site using the uncustomized v4.master we get the following code:

<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/controls.css?rev=iaQ4I0LJDsWyKK5jS2ed3g%3D%3D"/>
<link rel="stylesheet" type="text/css" href="/_catalogs/theme/Themed/8411CE2A/controls-6E924A6.css?ctag=19"/>
<link rel="stylesheet" type="text/css" href="/_catalogs/theme/Themed/8411CE2A/search-7E1AFF02.css?ctag=19"/>
<link rel="stylesheet" type="text/css" href="/_catalogs/theme/Themed/8411CE2A/wiki-ECF524AA.css?ctag=19"/>
<link rel="stylesheet" type="text/css" href="/_styles/corev4.css"/>

Updating the Site's theme via Site Actions | Site Settings | Look and Feel | Site Theme doesn't appear to work any longer. While there are no errors presented, the actual change does not get reflected on the site. Other than that theme settings page showing the current theme as the newly selected one there is no visual change.

I suspect this has to do with that bottom line using the /_styles/corev4.css. Other sites (using the same v4.master) don't have this problem. And the code on those sites is as follows:

<link rel="stylesheet" type="text/css" href="/_layouts/1033/styles/controls.css?rev=iaQ4I0LJDsWyKK5jS2ed3g%3D%3D"/>
<link rel="stylesheet" type="text/css" href="/_catalogs/theme/Themed/8411CE2A/controls-6E924A6.css?ctag=12"/>
<link rel="stylesheet" type="text/css" href="/_catalogs/theme/Themed/8411CE2A/search-7E1AFF02.css?ctag=12"/>
<link rel="stylesheet" type="text/css" href="/_catalogs/theme/Themed/8411CE2A/wiki-ECF524AA.css?ctag=12"/>
<link rel="stylesheet" type="text/css" href="/_catalogs/theme/Themed/8411CE2A/corev4-8A0ABD2F.css?ctag=12"/>

Notice the difference? The bottom line appears to be using the CSS located in the auto-generated folder correctly.

Now for my question. How can I get the site back to using the auto-generated theme instead of that root corev4.css file found in the Hive? This is causing us to not be able to update our Site theme now.

2 Answers 2

0

I can confirm as per my comment that /_styles/corev4.css is auto-generated by SharePoint Designer when you edit and attempts to save corev4.css.

To replicate:

  • Create a new site collection
  • Open it in SharePoint Designer
  • Open v4.master (Don't check out)
  • Click 'Styles' in the ribbon and then 'Manage Styles'. You'll see the style pane open in the right hand side with corev4.css listed (Hover the mouse over to see the actual file location of it)
  • Right click on corev4.css and select 'Go To Code'. The file opens in a new tab.
  • Edit the file in some trivial way and press CTRL+S to save. A warning appears asking if you want to save the customised style sheet. Click 'Yes'

The /_styles/corev4.css is now created.

  • Go back to the v4.master tab and hover over corev4.css again, you should see it now targets the new directory.

To revent back simply delete the entire /_styles directory or the /_styles/corev4.css file (and perhaps any other files in there).

0

If you haven't customized the master page, so you are running with any of the default ones, by the look at the resulting references it confirms that some Theme has been applied.

You could use Powershell to attempt to reset the Theme as described here.

Did you by any chance also used the Alternate CSS (for Publishing Sites)? If you have Publishing enabled, you could also Reset the master page and after that try again the Theme changing.

5
  • Thanks for the response. Here is some more information. (A) We are using the v4.master. If we switch to the nightandday.master the theme appears to work properly. I agree that some of the Theme is being applied but not completely as it should. (B) We attemped to use PowerShell to rest the Theme, using that very link you provided actually. No errors and no dice. (C) We didn't have Publishing enabled. I turned it on and tried resetting everything. Including using "Reset all pages in this site to site definition version". It still appears that /_styles/corev4.css won't correct itself. Commented May 30, 2013 at 12:47
  • The effects of each theme is in accordance with attributes used on top of each selector/class in the css referenced. Would it be possible that your v4 is corrupted? If it does work with nightandday.master properly. i assume you already know that you need to clear Cache before validating a new theme, because artifacts are cached (CTRL+F5). Did you also switched themes for test? Commented May 30, 2013 at 14:55
  • We replaced with a v4.master from another environment (development) that is working just fine. It did not correct the issue for us. Also we have attempted clearing the cache as well as using different browsers. Again no correction. We have also tried numerous theme switches to the OOTB themes. Same problem. Commented May 30, 2013 at 16:41
  • We just noticed today that the /_styles folder doesn't exist in SharePoint Designer in the environment that is working fine. What automatically generates / creates that folder and places a corev4.css file inside of it? Commented May 31, 2013 at 20:47
  • Editing the corev4.css file in SharePoint Designer auto-generates this folder and file. At least that is what it says in the book SharePoint Designer 2010 Unleashed By Kathy Hughes although the pages where it actually does so are missing from the online preview - books.google.co.uk/… Commented Jan 8, 2015 at 17:05

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.