Wednesday, March 21, 2012 2:16 PM
Hi, I've recently had to look at fixing a font spacing problem which involves changing our stylesheet. We have a few CSS files that we use, there is one in particular that I need to change to implement this fix.
I tested it on our Test environment fine, then went on to change the Live file but for some reason it is not taking effect. There haven't been any failed jobs in the Central Admin so I don't understand why it isn't using the new values I entered in the stylesheet.
It is definitely using the same stylesheet, I've used the developer toolbar, it just seems to be using the older version. I've checked in, published, approved, etc but no luck.
Anybody have any ideas please?
Wednesday, March 21, 2012 2:49 PM
Is the stylesheet is being deployed through the package or manual edit?
try clearing your blob cache?
SharePoint Is not A Nightmare , It's Just A Mystery :D Share Knowledge and Solve the Mystery :)
Thursday, March 22, 2012 10:27 AMJust a manual edit in SharePoint Designer. I've done this before with other stylesheets without any problems, it's strange.
Friday, March 23, 2012 10:59 AM
Ok, I've logged in with another site collection admin and they can change the file and the changes can be seen by that user. For some reason no other user is able to view the changes, not even other site collection admins.
There is no publish workflow setup and no approval so I don't understand why this is happening!
Monday, March 26, 2012 4:52 AM
Just verify that you have CHECKED IN & PUBLISHED your CSS file to be accessible by other users,
if you have not published it, all other users will have the previous Published version of CSS applied.
Also, try to clear the cache of your browser & just reload the page, this should resolve your problem.
Thanks, Kunal Govani
Tuesday, April 03, 2012 8:39 AM
Thanks but as I said in my first post I have checked the file in and published it. I don't understand why it is not working but I have found SharePoint Designer to be flaky for things like this at times. I've also tried clearing my browser cache and there's no change, it's very frustrating.
Tuesday, April 03, 2012 11:05 AM
Ok, the solution is:
Check out the css file and open it in editor in sharepoint designer. press F5. Make sure it reflects your changes, if not, make your changes. save the file. and leave it where it is
now go back to browser. Go to the library where that css file in being saved. Check-in that file using browser and make sure you publish the major version of it.
Hopefully it will work
Tuesday, April 03, 2012 3:46 PMThanks but unfortunately that did not work either. I also tried changing another stylesheet but I can't see any changes made either, maybe the Style Library has somehow become corrupt(?). Or maybe it's just a user problem?
- Edited by Dan Rooney Tuesday, April 03, 2012 3:52 PM
Tuesday, April 03, 2012 6:15 PM
Also, when you reference your css file, add a querystring with a counter that you modify each time you make a change:
This will ensure that the browser fetches the latest version of the file and does not use the version in cache.
Wednesday, April 04, 2012 7:00 AM
I begin to think you might be editing the wrong css file.
Use the developer tools of IE (Just hit F12 when on a sharepoint page) and see if the right css is loaded.
Click on the arrow in the developer bar and click on some item on the page that should have been altered by the css.
In the developer pane you will see all css files that are referenced, including in which order and what element is finally applied.
It could also be that some other css file is overriding your settings.
Willing to learn everything about Sharepoint there is to learn. My blog
Wednesday, April 04, 2012 8:41 AM
I'm definitely editing the correct stylesheet, I also use the IE developer toolbar and I've made changes to the very stylesheet previously without this problem. I have found SharePoint/SharePoint Designer to be quite poor at times.
For example, recently one of my page layouts had become corrupted for some reason - two SharePoint controls were not rendering and I had to delete them and add them again in the markup to ensure they pulled through again and it worked. I've also found quirks with the workflows, in particular deploying them with certain users were a problem despite their full permissions.
Wednesday, April 04, 2012 8:46 AM
The dev toolbar has Cache toolbar button - clear the cache and you will be fine if the latest file exists on server.
If above doesn't work then on the IIS go to the css file virtual directory and set cache expire option there its usually 1 year by default.
Wednesday, April 04, 2012 9:08 AM
Thanks Yogesh, I've tried clearing the cache but it doesn't make a difference.
There shouldn't be any reason for me to play in the IIS since I've never had to for these CSS changes before, also I'm not sure exactly where/what I should change in the IIS.
Wednesday, April 04, 2012 9:35 AMI gave up and created a new stylesheet in the Style Library and added a link to it from my master page. This has solved my problem but it isn't really a fix.
Wednesday, April 04, 2012 10:15 AM
Aaaargh!! I cannot update the new stylesheet now, the changes aren't taking effect even when checked in and published. There seems to be something wrong with me updating any CSS files in the Style Library. It's annoying!
It is possible at some point in the past there was content approval swtiched on and although there is no option to approve, maybe in the database it didn't work properly. I have no idea really.
Wednesday, April 04, 2012 10:34 AM
I've just noticed something quite interesting that those familiar with the SharePoint table workings might be able to help me with....
If I go into the style library from the browser and click on the version history of the CSS file, then if I click on the latest version (date hyperlink) it opens the older stylesheet that it uses for the site.
However, if I download a copy of the CSS file then it has the complete CSS with my changes, i.e. the correct latest version of the file.
Why/how is this happening?!
Wednesday, April 04, 2012 10:46 AM
Dan, please make sure you are registering your CSS file in master page.
<SharePoint:CssRegistration name="<% $SPUrl:~sitecollection/Style Library/~language/Core Styles/<Your_Style_Sheet>.css %>" After="corev4.css" runat="server"/>
Wednesday, April 04, 2012 11:09 AMI have registered the CSS file in the master page just fine. I registered the new one and it worked, as soon as I made a change it isn't updating the CSS properly