Tutorial :Deploying Layouts in SharePoint



Question:

I am developing publishing site. I have some layouts that are pre-populated with web parts and have a problem when I need to make some change on the layout. Deployment succeeds but I still see old version. If make I change in SP Designer it is reflected OK but not if the change is done by the feature that is being deployed. It looks like after I deploy particular layout any site collection in that web application will have the first version.

I have tried deleting complete site, all the pages, layouts and nothing happens, after deployment I still see old layout.

Current solution for this problem was that I take new virtual image and start with clean machine.

Real problem is how to solve this on clients installation without reverting to clean machine. There will be some bug fixes and I will have to send new WSP file with some changes in layout.

Is there any way to force SharePoint to use newly deployed layout and not some old Unghosted version?

If the layouts are without web parts I don't have this problem.

Update
I am using default "Publishing Portal" and deploying layouts using features. For development I am using VSeWSS 1.3.

tried in SharePoint designer to detach page from layout and attach it again but still no results.


Solution:1

Since you are using VSeWSS, you can execute your own code upon feature activation. So try writing an SPFeatureReceiver that will call SPWeb.RevertAllDocumentContentStreams() to reghost directly after feature activation on the web(s) in question.

If this doesn't work, then the problem isn't about ghosting, maybe it's about Orphans then. But try this first.


Solution:2

If it's a feature that you are deploying you have do deactivate the feature and activate it after deployment again. And don't forget to do an IISRESET or an AppPool recycle. If your new site collection has the first version of the layout make sure that it is really your new feature version that you are activating. Try to reject your solution first and add the new one after that.


Solution:3

Are you using Site Definitons or Site Templates? If you are using either of these it may not update after initial provisioning.

Try completely retracting and deleting the solution from central admin, resetting AppPools and then redeploying the solution.


Solution:4

Make sure your element manifest for your feature specifies that existing files should be overwritten.

Looks like some folks have had problems with layouts too...

See http://msdn.microsoft.com/en-us/library/ms459213.aspx


Solution:5

If you are developing new sitedefinition, you can attach your new layout in the onet.xml file by using the property, i hope it will help you

-->


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »