Wednesday, 2 July 2008

Uncustomising MOSS Pages

The newly-launched www.australiassouthwest.com site is live but suffers a small problem: at some point during development, after we imported content from MCMS 2002, someone or something checked out and published our trusty three column page layout. We deploy our master pages and page layouts using solutions and features, which means those artefacts live in the server's file system and are referenced by MOSS directly. Checking out and publishing one of these pages "customises" or "un-ghosts" the page by effectively moving a copy to the content database; changes made to the original file system content (ie. during a subsequent deployment) are then ignored.

As far as I've been able to determine, it's impossible to roll back to the original version 1.0, although you can sort of do it by checking out the page again, restoring v1.0, and publishing it as v3.0. This will pick up the latest file system content but any future changes won't be automatically reflected. Today I found a system page which does exactly the same thing: /_layouts/reghost.aspx. As the name implies, the end result for the page, page layout, or master page specified is a re-ghosted, or uncustomised, version of the page. I ran this with the page checked out and logged in to the site as administrator so my version update was logged as System Account (it failed using my own domain credentials).

All well and good but I'm still not back to a clean starting point and I think the next easiest option is to create a copy of the page layout in question and point all content pages to that layout. But that's really ugly.

[Update: Here's my solution]

No comments:

Post a comment

Spam comments will be deleted

Note: only a member of this blog may post a comment.