Posts

Showing posts from 2013

Provision a new Publishing Site: The site is not valid. The 'Pages' document library is missing.

  http://blogs.technet.com/b/stefan_gossner/archive/2011/09/15/common-error-the-site-is-not-valid-the-pages-document-library-is-missing-error.aspx Fix: Waiting for the Publishing Feature at Web is completed and provides the ["__PublishingFeatureActivated"] and ["__PagesListId"]: Because, the PublishingWeb will get the PageList via ["__PagesListId"]. property.    while (!(subweb.AllProperties["__PublishingFeatureActivated"].ToString().Equals("True",StringComparison.InvariantCultureIgnoreCase)) ||                                         !(subweb.AllProperties["__PagesListId"].ToString().Equals(PublishingWeb.GetPagesListId(subweb).ToString(),StringComparison.InvariantCultureIgnoreCase)))             {    ...

A duplicate field name ‘X’ was found.

  When adding a custom Content Type that contains a metadata field to SPList/Library, you can get the error message: A duplicate field name ‘X’ was found. ( X can be the Name or ID (GUID) of metadata field). Our custom Content Type is provided via a feature. The problem comes from the order of Metadata fields in Content Type, the Note field should be after the Metadata field. <FieldRef ID="{F88D530B-705F-488A-9069-FAF5C79B61F7}" Name="RegionalOffice"/> <FieldRef ID="{9EDAB26E-CC44-4027-AB05-CB44EA3A6F72}" Name="RegionalOfficeTaxHTField0"/> If the .order of Note field is above the Metadata field like below, you can get the error. <FieldRef ID="{9EDAB26E-CC44-4027-AB05-CB44EA3A6F72}" Name="RegionalOfficeTaxHTField0"/> <FieldRef ID="{F88D530B-705F-488A-9069-FAF5C79B61F7}" Name="RegionalOffice"/>

Checking browser types

Image
  In SharePoint 2010, we have an object in JavaScript ( browseris ) from init.js that supports to detect the current browser that user is using. In SharePoint 2013 this object has some more new browser types like ipad, msTouch,win8AppHost…. This object very useful in SharePoint 2013 when almost operations in SharePoint can do via JavaScript.

IE F12 - Debug JavaScript in MVC - Partial View

Image
Refer this topic to use IE F12 Debugger: http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx But with JavaScript code that includes in MVC Partial Views, it's not easy to debug. There is a away to debug the JavaScript by adding the debugger on JavaScript source code. Make sure the F12 of IE is active.