1

I have 3 css files that are located there : site\style library\folder\css

These 3 files was deployed from a solution (.wsp). In the Elements.xml file, every css has these properties : Type="GhostableInLibrary" IgnoreIfAlreadyExists="FALSE"

I have modify just one of the files manually by copy over the file directly in SharePoint 2010.


Now i try to update these 3 files from the solution (.wsp) with an STSADM -o upgradesolution...

None of the files is upgraded in SharePoint 2010.

I tried :

  • CTRL-F5 in browsers to clear the cache
  • IISRESET
  • Restart the server
  • Delete the css folder before the upgradesolution
  • Reinstall the solution from central admin

Nothing works!

What im missing?

N.B. Im on a VM so i can try everything and go back.

Thanks

3

IgnoreIfAlreadyExists needs to be set to TRUE.

IgnoreIfAlreadyExists="FALSE" => Don't update if file already exists.

IgnoreIfAlreadyExists="TRUE" => Do update even though file already exists.

2

Try the following in powershell to see whether your CSS file is customized:

$web = get-spweb http://yourweb
$f = $web.GetFolder("Style Library/folder/css")
$f.Files |? {$_.CustomizedPageStatus.ToString() -eq "Customized"} |% {$_.Name}

If it's customized, use the following to revert back to unghosted mode:

$f.RevertContentStream()      

Reference here.

  • Only one css file is customized... So why the other two are not updated? – user24566 Apr 11 '14 at 18:05
  • @user24566 I just noticed that you are running stsadm -o upgradesolution. Try fully retracting the solution before redeploying it. That is, run Uninstall-SPSolution & Remove-SPSolution. Afterwards, redeploy with Add-SPSolution & Install-SPSolution. Don't use stsadm, use powershell. Let me know how it goes. – Phil Greer Apr 11 '14 at 20:31
  • @user24566 Did you resolve your issue? Were the CSS files checked out, by chance? – Phil Greer Apr 16 '14 at 16:22
1

It sounds like you need to active or re-activate the feature. Try running install-spsolution after you have added it to the solution store. If it's site or web scoped feature you need to activate it on the appropriate site collection or sub site.

1

Here's what I did to solve my problem:

  • IgnoreIfAlreadyExists Needs to be set to TRUE everywhere in the Elements.xml files
  • Upgrade solution
  • Deactivate the Feature
  • Delete the CSS folder
  • Reactivate the Feature

Voilà!

Thanks to all for your great advices!

1

I had the same issue with other element files deployed in a sandboxed solution that would not be updated even after restarting / redeploying etc.

In the end the following was simply required in the element in my Elements.xml file:

ReplaceContent="TRUE"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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