RE: Ghost - unghost - re-ghost
Deactivate the feature and confirm all provisioned files got removed via SPD then reactivate the feature again. Sometimes you will need to manually remove the provisioned file if not removed by feature deactivation. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wilson Wampers Sent: Friday, 6 November 2009 12:48 AM To: 'ozMOSS' Subject: RE: Ghost - unghost - re-ghost Yes, tried all that .. no joy though. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Joshua Haebets Sent: Thursday, November 05, 2009 2:15 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Have you tried, deactivating and reactivating the solution Might also be worth deploying it Cheers Josh From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 5:01 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost C:\Documents and Settings\Administratorstsadm -o gl-reghostfile -url http://litwareportal/_catalogs/masterpage/somePage.aspx Progress: Re-ghosting (uncustomizing) 'http://litwareportal/_catalogs/masterpage/ somePage.aspx' ERROR: Unable to re-ghost (uncustomize) file /_catalogs/masterpage/ somePage.aspx Operation completed successfully. ?...@#$%^*?, so I guess I've more than one problem here L From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Thursday, 5 November 2009 09:51 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost I've seen stranger things. J Curious to know the outcome in any case. Sounds like a problem anyone could run into. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:46 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Hi, I will try Josh's suggestion with the Gary Lapoint stsadm extensions and let you know the outcome. Only one page behaves badly out of a dozen files (I've noticed a syntax error in the page though, this might have caused the dislocated behaviour) Kind Regards, Wilson Wampers From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Thursday, 5 November 2009 09:22 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Quick question: how many page layouts are deployed via the feature? And how many are having the problem? From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:10 PM To: ozmoss@ozmoss.com Subject: Ghost - unghost - re-ghost Hi All, I'm a bit puzzled, I have page layouts added to a publishing site collection using a feature. No custom site definition, just the OOTB publishing site definition. After a backup restore adventure (major SP crash and recovery effort), one of the page layouts although un customized didn't pick up changes in the 12 hive. I've noticed looking at the master page gallery using SPD that one custom master page and one page layout (this particular one) seems to have been modified by SHAREPOINT\system, whilst all other pages seem to have been modified by the SharePoint Farm Admin account as one would expect after a feature install. So I've updated the file using SP Designer and tried the following: static void Main(string[] args) { string siteUrl = http://litwareportal;; using (SPSite site = new SPSite(siteUrl)) { using (SPWeb web = site.OpenWeb()) { PublishingSite publishingSite = new PublishingSite(site); PageLayoutCollection pageCollection = publishingSite.PageLayouts; foreach (PageLayout layout in pageCollection) { SPFile currentFile = web.GetFile(layout.ServerRelativeUrl); Console.WriteLine({0} -- {1}, layout.Name, currentFile.CustomizedPageStatus); } foreach (PageLayout layout in pageCollection) { SPFile currentFile = web.GetFile(layout.ServerRelativeUrl); if (currentFile.CustomizedPageStatus == SPCustomizedPageStatus.Customized) { currentFile.RevertContentStream(); currentFile.Update(); } } } } Console.ReadLine(); } , but it doesn't seem to be willing to un customize. Debug step through shows it does execute the code as intended, but the result remains the same. ( I've also tried with and without the .update() method.) Using the UI à revert to site definition à I get an error message
RE: Ghost - unghost - re-ghost
Hi Jeffery, Can't use SPD delete since these pages are in use. Cheers, Wilson From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Friday, 6 November 2009 05:54 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Deactivate the feature and confirm all provisioned files got removed via SPD then reactivate the feature again. Sometimes you will need to manually remove the provisioned file if not removed by feature deactivation. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wilson Wampers Sent: Friday, 6 November 2009 12:48 AM To: 'ozMOSS' Subject: RE: Ghost - unghost - re-ghost Yes, tried all that .. no joy though. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Joshua Haebets Sent: Thursday, November 05, 2009 2:15 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Have you tried, deactivating and reactivating the solution Might also be worth deploying it Cheers Josh From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 5:01 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost C:\Documents and Settings\Administratorstsadm -o gl-reghostfile -url http://litwareportal/_catalogs/masterpage/somePage.aspx Progress: Re-ghosting (uncustomizing) 'http://litwareportal/_catalogs/masterpage/ somePage.aspx' ERROR: Unable to re-ghost (uncustomize) file /_catalogs/masterpage/ somePage.aspx Operation completed successfully. ?...@#$%^*?, so I guess I've more than one problem here L From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Thursday, 5 November 2009 09:51 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost I've seen stranger things. J Curious to know the outcome in any case. Sounds like a problem anyone could run into. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:46 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Hi, I will try Josh's suggestion with the Gary Lapoint stsadm extensions and let you know the outcome. Only one page behaves badly out of a dozen files (I've noticed a syntax error in the page though, this might have caused the dislocated behaviour) Kind Regards, Wilson Wampers From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Thursday, 5 November 2009 09:22 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Quick question: how many page layouts are deployed via the feature? And how many are having the problem? From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:10 PM To: ozmoss@ozmoss.com Subject: Ghost - unghost - re-ghost Hi All, I'm a bit puzzled, I have page layouts added to a publishing site collection using a feature. No custom site definition, just the OOTB publishing site definition. After a backup restore adventure (major SP crash and recovery effort), one of the page layouts although un customized didn't pick up changes in the 12 hive. I've noticed looking at the master page gallery using SPD that one custom master page and one page layout (this particular one) seems to have been modified by SHAREPOINT\system, whilst all other pages seem to have been modified by the SharePoint Farm Admin account as one would expect after a feature install. So I've updated the file using SP Designer and tried the following: static void Main(string[] args) { string siteUrl = http://litwareportal;; using (SPSite site = new SPSite(siteUrl)) { using (SPWeb web = site.OpenWeb()) { PublishingSite publishingSite = new PublishingSite(site); PageLayoutCollection pageCollection = publishingSite.PageLayouts; foreach (PageLayout layout in pageCollection) { SPFile currentFile = web.GetFile(layout.ServerRelativeUrl); Console.WriteLine({0} -- {1}, layout.Name, currentFile.CustomizedPageStatus); } foreach (PageLayout layout in pageCollection) { SPFile currentFile = web.GetFile(layout.ServerRelativeUrl); if (currentFile.CustomizedPageStatus == SPCustomizedPageStatus.Customized) { currentFile.RevertContentStream(); currentFile.Update(); } } } } Console.ReadLine
RE: Ghost - unghost - re-ghost
Yeah, had something similar in mind ... won't happen until somewhere next week though .. will keep you updated on the outcome, cheers, Wilson From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Friday, 6 November 2009 09:05 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost This is painful. How many pages using the trouble page layout? Possible workaround is associate the pages to a dummy layout, delete the trouble layout file, reprovision the file via feature, associate the pages back to the layout. Err...pain. Anyone? From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Friday, 6 November 2009 11:12 AM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Hi Jeffery, Can't use SPD delete since these pages are in use. Cheers, Wilson From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Friday, 6 November 2009 05:54 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Deactivate the feature and confirm all provisioned files got removed via SPD then reactivate the feature again. Sometimes you will need to manually remove the provisioned file if not removed by feature deactivation. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wilson Wampers Sent: Friday, 6 November 2009 12:48 AM To: 'ozMOSS' Subject: RE: Ghost - unghost - re-ghost Yes, tried all that .. no joy though. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Joshua Haebets Sent: Thursday, November 05, 2009 2:15 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Have you tried, deactivating and reactivating the solution Might also be worth deploying it Cheers Josh From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 5:01 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost C:\Documents and Settings\Administratorstsadm -o gl-reghostfile -url http://litwareportal/_catalogs/masterpage/somePage.aspx Progress: Re-ghosting (uncustomizing) 'http://litwareportal/_catalogs/masterpage/ somePage.aspx' ERROR: Unable to re-ghost (uncustomize) file /_catalogs/masterpage/ somePage.aspx Operation completed successfully. ?...@#$%^*?, so I guess I've more than one problem here L From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Thursday, 5 November 2009 09:51 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost I've seen stranger things. J Curious to know the outcome in any case. Sounds like a problem anyone could run into. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:46 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Hi, I will try Josh's suggestion with the Gary Lapoint stsadm extensions and let you know the outcome. Only one page behaves badly out of a dozen files (I've noticed a syntax error in the page though, this might have caused the dislocated behaviour) Kind Regards, Wilson Wampers From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Thursday, 5 November 2009 09:22 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Quick question: how many page layouts are deployed via the feature? And how many are having the problem? From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:10 PM To: ozmoss@ozmoss.com Subject: Ghost - unghost - re-ghost Hi All, I'm a bit puzzled, I have page layouts added to a publishing site collection using a feature. No custom site definition, just the OOTB publishing site definition. After a backup restore adventure (major SP crash and recovery effort), one of the page layouts although un customized didn't pick up changes in the 12 hive. I've noticed looking at the master page gallery using SPD that one custom master page and one page layout (this particular one) seems to have been modified by SHAREPOINT\system, whilst all other pages seem to have been modified by the SharePoint Farm Admin account as one would expect after a feature install. So I've updated the file using SP Designer and tried the following: static void Main(string[] args) { string siteUrl = http://litwareportal;; using (SPSite site = new SPSite(siteUrl)) { using (SPWeb web = site.OpenWeb()) { PublishingSite publishingSite = new PublishingSite(site); PageLayoutCollection pageCollection = publishingSite.PageLayouts; foreach (PageLayout layout
RE: Ghost - unghost - re-ghost
Here is a quicker way of doing the dirty work. I've tested it on my dev environment and it worked as expected. It picks up the changes as well. 1. Deactivate the feature 2. Browse to master page folder in SPD 3. Create a dummy folder dummy 4. Move all the trouble page layouts into dummy folder (all pages associated with the layout will now point to the new location of the file) 5. Delete dummy folder (all pages associated with the layout will get a file not found error) 6. Reactivate the feature 7. Recreate the dummy folder under master page 8. Move the provisioned page layouts (the ones got moved in step 4) to the dummy folder (this fixed the file not found error) 9. Move the files back to master page PS. Test this in dev/testing environment first. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Friday, 6 November 2009 1:03 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Yeah, had something similar in mind ... won't happen until somewhere next week though .. will keep you updated on the outcome, cheers, Wilson From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Friday, 6 November 2009 09:05 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost This is painful. How many pages using the trouble page layout? Possible workaround is associate the pages to a dummy layout, delete the trouble layout file, reprovision the file via feature, associate the pages back to the layout. Err...pain. Anyone? From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Friday, 6 November 2009 11:12 AM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Hi Jeffery, Can't use SPD delete since these pages are in use. Cheers, Wilson From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Friday, 6 November 2009 05:54 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Deactivate the feature and confirm all provisioned files got removed via SPD then reactivate the feature again. Sometimes you will need to manually remove the provisioned file if not removed by feature deactivation. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wilson Wampers Sent: Friday, 6 November 2009 12:48 AM To: 'ozMOSS' Subject: RE: Ghost - unghost - re-ghost Yes, tried all that .. no joy though. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Joshua Haebets Sent: Thursday, November 05, 2009 2:15 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Have you tried, deactivating and reactivating the solution Might also be worth deploying it Cheers Josh From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 5:01 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost C:\Documents and Settings\Administratorstsadm -o gl-reghostfile -url http://litwareportal/_catalogs/masterpage/somePage.aspx Progress: Re-ghosting (uncustomizing) 'http://litwareportal/_catalogs/masterpage/ somePage.aspx' ERROR: Unable to re-ghost (uncustomize) file /_catalogs/masterpage/ somePage.aspx Operation completed successfully. ?...@#$%^*?, so I guess I've more than one problem here L From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Paul Noone Sent: Thursday, 5 November 2009 09:51 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost I've seen stranger things. J Curious to know the outcome in any case. Sounds like a problem anyone could run into. From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:46 PM To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Hi, I will try Josh's suggestion with the Gary Lapoint stsadm extensions and let you know the outcome. Only one page behaves badly out of a dozen files (I've noticed a syntax error in the page though, this might have caused the dislocated behaviour) Kind Regards, Wilson Wampers From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Jeffery Tsui Sent: Thursday, 5 November 2009 09:22 To: ozMOSS Subject: RE: Ghost - unghost - re-ghost Quick question: how many page layouts are deployed via the feature? And how many are having the problem? From: ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of Wampers, Wilson [Talent International] Sent: Thursday, 5 November 2009 12:10 PM To: ozmoss@ozmoss.com Subject: Ghost - unghost - re-ghost Hi All, I'm a bit puzzled, I have page layouts added to a publishing site collection using a feature. No custom site definition, just