views:

786

answers:

5

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.

+1  A: 

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.

wroks
I am doing development from VS using VSeWSS. I have tried lots of things with no result.
Robert Vuković
+1  A: 

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.

Steve Ruiz
I am not using Site Definitons or Site Templates. I am deploying layouts using features.
Robert Vuković
+1  A: 

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.

ROXORITY SharePoint Web Parts
and let us know whether this worked! :)
ROXORITY SharePoint Web Parts
Actually it kinda works but not deterministic. It layout updates on a page after some trial end error deployment problems. Just to make it work on the first deployment.
Robert Vuković
It looks like I have to do IISRESET before deployment. then it works.
Robert Vuković
+1  A: 
Andy Burns
SPWeb.RevertAllDocumentContentStreams() helped, but I have to do iisreset BEFORE deployment. Without iisreset there is no change.
Robert Vuković
A: 

Hi, 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

-->