Ghosted & unghosted layouts: where/how are they??


You may have come across a situation when for example you upgrade a solution with layouts and they just don’t get updated… One possible cause for this situation is that when you deploy layouts by a solution package, this means that the layouts become ghosted (their existence in file system will prevail from its existence in database). So far so good.

Now, after your deployment you (for some strange reason) decide to edit the layout with Sharepoint Designer. WHOOPS! Big NO NO!!! From this moment on, the layout becomes unghosted, meaning that the version from the database will prevail from now on. At this point you may not even notice the problem. Sharepoint will continue to serve the last version of the layout.

Finally you update the layout solution again and you find out that the layout won’t update and you will start the cursing period. If you open the layout with the designer or you access the page that uses the layout, you will find its unghosted version (the one that you edited with the designer) and not the one that you updated with your solution update. Knowing this is happening will solve 50% of your problem. Justifying/proving this is the problem will solve another 45% and for this I suggest a great piece of code which will list your unghosted layouts in a site collection: Uncustomized vs. Customized (Ghosted vs. Unghosted) . Any sugestions for the remaining 5%? 🙂

Leave a comment