Thursday, November 10, 2011

SharePoint Publising Page Problem MOSS Page Setting Error - Value does not fall within the expected range

When try to access publishing page or page setting getting error “Value does not fall within the expected range” . This error only happens when you copy an aspx page using SharePoint designer from one server to another severs (development server to production server). Also if you copy pages in the same server and changed alternate access mapping url.

Solutions:

  1. You cannot copy and paste the aspx page using SharePoint designer. First, export the aspx page using SharePoint designer to a physical file.
  2. Open the aspx page with notepad and search on the “mso:PublishingPageLayout”. You will notice your development portal URL is there.
    <mso:PublishingPageLayout msdt:dt=”string”>http://xxxdevelopmenturl/_catalogs/masterpage/BlankWebPartPage.aspx, Blank Web Part Page</mso:PublishingPageLayout>
  3. Replace your development URL (xxxdevelopmenturl) to the production URL or remove http://xxxdevelopmentur and save it.
  4. Open your production site with SharePoint Designer and import the modified aspx page.

If you found this error in production server open site using SharePoint Designer go to TaskPane-->Hyperlinks and edit hyperlinks of layouts like above sample:
Replace:http://xxxdevelopmenturl/_catalogs/masterpage/BlankWebPartPage.aspx
By: /_catalogs/masterpage/BlankWebPartPage.aspx

Also you can fix programmatically check url:

http://support.microsoft.com/kb/953445

Also Check this if you found your any modifications Navigation setting aren't saved.
or an error like image below:

Thursday, June 9, 2011

Failure trying to synch site for ContentDB WebApp

Problem:
Periodical errors in the event log of a SharePoint 2010 server with the following error event descriptions:
Failure trying to synch site for ContentDB WebApp . Exception message was Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'. The statement has been terminated.
Cause:

Old references to non existing content databases in the synchronization job list.

Fix:
List databases which are not synced for more than two days
stsadm -o sync -listolddatabases 2

Delete old database references from the config db
stsadm -o sync -deleteolddatabases 2

Tuesday, May 10, 2011

Upgrade SharePoint 2010

In this article I will put lessons I learned when try upgrade Share Point 2007 sites to Share Point 2010 I will update this article when find new item:
Consider Visual upgrade Mater Page:



  1. Check URL:http://msdn.microsoft.com/en-us/library/ee539981.aspx
Copy All Physical Files from old site:


  1. Features


  2. Site Templates


  3. Custom Lists,Custom Fields, Content types, and etc.
General Code:



  1. It is prefer all dlls are used with feature has strong name and in GAC.Converting SSP to separate services:


  2. When use custom code to search using API (This include third party code)


  3. When use custom code to access User Profile using API (This include third party
    code)


  4. When use custom code to access BDC using API (This include third party




Corrupted out of the box work flow:
When we try to start work flow for document library you will find out of the box workflow Approval and FeedBack. I didn't find it when upgrade to 2010.
To Solve this problem I assigned new workflow for Document Content Type of Site with name approval and FeedBack with default setting.

Report center feature is removed from SharePoint 2010:

If you used it you need to copy feature folder from sharepoint 2007 and install feature using command:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\ReportCenterCreation stsadm -o installfeature -filename ReportCenterCreation\feature.xml -force

Missing Web Parts:After upgrade found errors to find web parts information run query:
SELECT *
FROM dbo.AllWebParts
WHERE WPT.tp_WebPartTypeId = MissingID

Custom Site Definition Upgrade:when you upgrade and you have custom site definition. You need to consider items below:






  1. All Site created from this site definition will be upgraded, Only you need to copy all physical files of this site definition and all of its dependence (custom fields, Custom Lists, features,...etc).




  2. To use site definition in new environment need to consider some points:






  • ReportCenterCreation feature has been removed need to deploy this feature from old environment as above or replace by new template for BI.




  • UI Versions: SharePoint Site has property called UIVersion.
    When its value is 3 mean display interface as version SharePoint 2007. When its value is 4 need interface as SharePoint 2010 (Need some modifications in master-pages, style sheet, and etc). For upgraded created sites it will be kept 3 until you run Visual Upgrade.
    But when you create site from old site definition UI Version is 4. Which need to modify GUI to work fine with SharePoint 2010 UI or you need to keep the same interface you need to update UIVersion to 3 and update another property UIVersionUpgrade to true to give user option to upgrade site UI to SharePoint 2010 interface.
    To keep UIVersion 3 you need to create feature added to onet.xml updated when site is created:
    http://aanuwizard.wordpress.com/2010/06/30/sharepoint-2010-branding-changing-uiversion-of-sharepoint-site/uiversion-of-sharepoint-site/
    Also you can keep same UI work as SharePoint 2007 or SharePoint 2010 depend on on UIVersion value:
    http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=17

    Site templates:
    Any webs created from site templates based OOBT will upgrade perfectly fine so long as SharePoint 2010 knows the site template it's based on.
    But STP file itself as it sits in the site template gallery will not be upgraded to SharePoint 2010. Before upgrade you'll need to create a new site using each of your site templates, then save them back out after the upgrade. Site template go away in SharePoint 2010, they're now solution.

    Navigation:When you use navigation like below:
    <add name="MyCustomSiteMapProvider" siteMapFile="mycustom.sitemap" type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

    you will find url appear as http://domain/test.aspxhttp://domain.aspx.

    To solve this issue you need to replace site map provide



Microsoft.SharePoint.Navigation.SPXmlContentMapProvider by System.Web.XmlSiteMapProvider
This will appear as below:

<add name="MyCustomSiteMapProvider" siteMapFile="mycustom.sitemap" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />


Related Artcles:
Missing Features after upgrade:
http://justgeeks.blogspot.com/2012/06/resolving-missing-references-when.html
http://blogs.technet.com/b/sushrao/archive/2011/12/02/sharepoint-2010-missing-server-file-or-server-configuration-issues.aspx

Sunday, January 23, 2011

Unable to modify navigation - Add heading/link

When I Try to modify Navigation in a site and add a heading, this is not working. When pushing OK, there is nor error messages appearing, but the heading is not showing up.
Problem missed navbar nodes of the onet.xml in custom site template.
  • Solution add NavBar nodes to onet.xml:<navbars>
    <navbar name="SharePoint Top Navbar" id="1002">
    </navbar>
    </navbars>
  • Wrote an SQL query to update the broken sites. T-Sql to execute in contentdbINSERT INTO [NavNodes] ([SiteId] ,[WebId] ,[Eid] ,[EidParent] ,[NumChildren] ,[RankChild] ,[ElementType] ,[Url] ,[DocId] ,[Name] ,[DateLastModified] ,[NodeMetainfo] , NonNavPage] ,[NavSequence] ,[ChildOfSequence])
    SELECT DISTINCT SiteId, WebId ,1002 ,0 ,0 ,1 ,1 ,'' ,NULL ,'SharePoint Top Navbar' ,getdate() ,NULL ,0 ,1 ,0
    FROM NavNodes
    WHERE WebId NOT IN (
    SELECT WebId
    FROM NavNodes
    WHERE Eid = 1002)
  • The query adds the SharePoint Top Navbar node to the NavNodes tables where a web does not already have one.