2014-09-04

One of my client reported an issue in SharePoint Publishing Site “Hey Folks!!! We have issues while publishing the home page contents and the changes are not saved”. Content Management team reported an issue as Priority 1. Team started to gather the logs and found no foot prints in the event viewer.

Issue

  • An unexcepted error occurred with Correlation ID.
  • This occurs while editing the home page of the SharePoint site
  • All SP 2010 Admin would have start loving this message.

Triage

  • Collected the ULS logs files.
  • Investigated the logs and found that the issue is with the Publishing Feature

Impact

It’s not an easy tasks to solve the incident, the blunder happened when I deactivated and activated the Publishing feature. The GLOBAL NAVIGATION broken (Expected).

Solution

  • Logged on the SharePoint server as Farm Administrator.
  • Installed SharePoint Manager 2010.
  • Explored the Root Site property and found the __PublishingFeature is set to FALSE
  • Changed the property value to TRUE
################################################################## 
# Script : To enable publishing Feature 
# Developer : Chendrayan Venkatesan 
# Contact : chendrayan.exchange@hotmail.com
################################################################## 
 
#To Generate a Log File 
$log = "FootPrints-{0:yyyyMMdd-HHmmss}.RTF" -f (Get-Date) 
Start-Transcript -Path $log 
Write-Host "" 
 
#Print the activity on the screen 
Write-Host -f Green "Activating the __PublishingFeatureActivated " 
Write-Host "" 
 
#Get the SharePoint site 
$site = Get-SPSite "http://www.yoursitename.com" 
$web = $site.openweb() 
 
#Activate the feature 
$Web.AllProperties["__PublishingFeatureActivated"]="True" 
 
#Commit the changes on the site 
$Web.Update() 
Stop-Transcript 
exit 0

 

About the author 

Chendrayan