0

I am trying to deploy pages to a pages library for the second time by activating a feature. The module has the attribute: ReplaceContent="TRUE".

When I deactivate the feature, everything goes fine. When I activate the feature, I receive an error that the pages are checked out to another user (which is my account, the same account am doing the activate process with), and I can't deploy the pages.

Do I need to have the pages checked in? even if am the same user who has them checked out?

Do I need to delete the page before activating the feature to deploy the new page?

Also if someone can tell me the difference between IgnoreIfAlreadyExists and ReplaceContent .

Thanks.

2

You don't need to delete the page.You just need to check in the page even if it is same account.

ReplaceContent allows you to overwrite the ghostable file.This is nw

IgnoreIfAlreadyExists=true
SharePoint doesn’t freak out if the file already existed in the library but it never allowed us to replace the file.

Please find link below.

https://blogs.msdn.microsoft.com/how24/2013/06/14/overwriting-ghostable-files-in-sharepoint-2013-libraries-using-feature-elements-no-code/

  • Thanks Akshay, the article says that if the user trying to activate the feature is the same user who has the document checked out to, it should be OK: "One thing to be careful with though, if the document or file you are trying to replace is checked out by a different user, other than the user you are using to activate the feature, the feature activation will fail with the following error:" In my case, it's giving an error that the file is checked out by another usr. – Jacky Nov 30 '16 at 14:40
  • Any idea......? – Jacky Nov 30 '16 at 22:21

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.