SharePoint Page Layouts and Site Templates “The object specified does not belong to a list.”

SharePoint Version: SharePoint 2010, SharePoint 2013

Ever try and update the available page layouts for a site and get the following error:


“The object specified does not belong to a list.”


The chances are some page layout got deleted or corrupt and is blowing up this page. The following PowerShell will set the site so all page layouts are available and can get you past this issue.


Reset site to use all page layouts

    #required params
    [string]$webName  = $(throw "webName parameter not specified"),
    [string]$resetsubsites  = $(throw "resetsubsites parameter not specified")

if (-not (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue))
    Add-PSSnapin Microsoft.SharePoint.PowerShell
$web = Get-SPWeb $webName;
if ([Microsoft.SharePoint.Publishing.PublishingWeb]::IsPublishingWeb($web))
    $spPub = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($web)
    $spPub.IsAllowingAllPageLayouts # check to see if it is already set
    $spPub.AllowAllPageLayouts($false) #Set it to allow all page layouts
    Write-Host $webName is not a publishing web.

Categories: SharePoint Tags: ,

SharePoint 2013 Search – Display Error: The display template has an error…


Another silly one… If you are testing search while directly on the server, you may see the following issue:

Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.

Automation server can’t create object (CoreRender: ~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_CommonItem_Body.js)



A simple fix is to add the url of the site to the Local Intranet zone or Trusted Sites zone in Internet Explorer.



From Internet Options, select the Security tab, select Local Intranet zone (or trusted sites zone). Click Sites, and add the site under Advanced.

Categories: SharePoint Tags:

User Profile Service stuck on starting

SharePoint Version: 2013

Build: (DEC CU)

There are many blogs out there dealing with this issue, as it’s not a new issue at all. However, I’m adding it here for my own record as I run in to it more than I would like. For the most part it’s related to permissions and the service will eventually return to stopped mode. However, there are situations where it truly is stuck on Starting.

If you find that the service is stuck on starting after trying various things like restarting the server, and waiting for days on end, then try the following script (replace <SERVERNAME> with the name of the server where the service instance is stuck on):


$n = Get-SPServiceInstance –Server <SERVERNAME>| ?{$_.TypeName -eq "User Profile Synchronization Service"}

Stop-SPServiceInstance $n.ID

Once the service instance stops, you can attempt to start it again from the services on server page.

Categories: SharePoint Tags:

SharePoint BCS profile form and the dreaded Minimal Download Strategy

December 6, 2013 Leave a comment

SharePoint Version: SharePoint 2013 Enterprise, (October 2013 CU)

Came across a nice little nugget from SharePoint 2013 recently.  I had to create a BCS connection to external data in a SQL Azure database. Got the BCS connection working (eventually).

When I created the external list in a team site, I could see the list items ok, but when I clicked to open one by selecting View Profile, I would get the lovely:



But that’s ok, because we have a correlation ID we can trace in the logs. The Correlation ID is

00000000-0000-0000-0000-000000000000. Try finding that in the logs.



After much messing around with the BCS (obviously thinking that the issue is in the profile form), it turns out it had nothing to do with BCS. It was actually the feature Minimal Download Strategy.


Disable this feature, and the profile form works fine.

This is not the first time this (unbelievably poorly implemented) feature has bitten me. It is now our standard practice to disable this for every site. How sad is that.

Categories: Uncategorized

SharePoint 2013 Enterprise Search Center as a subsite

August 22, 2013 Leave a comment

Lets say you have a publishing site. and lets say you want to create a search center as a sub site. You might go to Site content page and click New subsite. And then you might look under the Enterprise tab for the enterprise search center template.



It’s not there. 

To get the Enterprise search center template, you need to activate the site collection feature:

SharePoint Server Standard Site Collection features


Once that’s activated, then you can create an enterprise search center as a subsite.


Categories: SharePoint Tags:

Installing and configuring SharePoint 2013

April 10, 2013 Leave a comment

There are many guides on configuring SharePoint manually, automated with PowerShell, and so on.  And here’s another one Smile. This is not a fully detailed blog (easy reading), but rather to have you take pause and get the basics ready before mounting that iso.

Installing SharePoint is one thing, but before you jump straight in, we want to plan for:

  • Service accounts
  • SQL configuration
  • Local server configuration
  • Patch management

If you are doing a production install, then you will want to do full architecture planning for hardware requirements,  capacity planning, load balancing, service continuity, etc. We’ll keep that for another post Winking smile.


Getting ready…

I see time and again users jumping straight into SharePoint install by mounding the iso, and clicking Install SharePoint. Even if you are setting up a test or developer environment, it is worth doing right.

Before we get started in mounting the iso, we want get a few things taken care of first. We need a few service accounts, we need to do some SQL configuration, and we need to get our SharePoint server(s) ready.


Hardware Requirements

TechNet has a post on hardware requirements that should be reviewed. While these are good minimums, I typically increase their recommended memory allocation by at least 50%.

If you are building out a dev/personal environment, you want to give it 8Gb if you can, and 60-80Gb for OS drive.

For SQL, again if it’s a dev environment, you can get away with 4Gb, but for a production you want to start at 24Gb.

If you are planning to install SQL on the same server as SharePoint then you would need to account for this in your memory allocation.  I would never recommend that you do this, unless it is a very simple kick-the-tires situation.


Service Accounts

I have another blog on recommended service accounts for SharePoint, so no need to get into the details here.  To get our installation complete and farm configured we are going to need at least the following:

  • Farm account
  • Install account
  • SQL service account

SQL Configuration

To get our SQL server ready for SharePoint, we need to do the following:

  • Set permissions
  • Set max degree of parallelism
    Setting SQL permissions


    After installing SQL and setting it up using the sql service account, we need to give our SharePoint install account permissions to:

  • Create database
  • manage permissions

    Set Max degree of parallelism

      See this post on setting this property.



    SNAGHTML2ee89340Configure Firewall

    In order to allow the SharePoint server to connect to SQL, you may need to configure the windows firewall to allow the connection. SQL connections are made over port 1433.


    Preparing the SharePoint servers

    So we have our service accounts and SQL server setup, all we need is to prep our SharePoint servers and we are good to go.

    To get our SharePoint servers ready we need to:

    • Set local permissions
    • Install utility software
    • Install prerequisites
      Set local permissions

    Tempting as it might be to just use the domain administrator account to install SharePoint, do not. Now is the time to start getting into the habit of using dedicated functional accounts.

    Give your install account local admin permissions so it can logon and do the SharePoint install.

    Install Utility Software

    This is not a requirement, but there are a few utilities I like to install:

    If you have any other recommendations, please let me know in the comments!

    Installing the prerequisites SNAGHTML10aa4f7d

    SharePoint needs a bunch of installs on the server before we can actually lay down the SharePoint bits. Luckily, the prerequisites installer provided with the SharePoint iso takes care of installing and configuring them all.

    Mount the SharePoint iso and start autoplay. Click Install software prerequisites to get them installed.


    SNAGHTML10b444a5Once the prerequisites are installed, we can proceed with SharePoint by clicking Install SharePoint server.

    You will likely have to restart the server after the prerequisites. If you are mounting the iso from another file share, you should make sure that the mount point is re-established so the prerequisite installer can continue. If it cannot find the mount point, it will throw an error on restart. If that happens, simple remount the iso then run the following command from the root folder of the mounted drive:

    prerequisiteinstaller.exe /continue


    Install SharePoint Server

    Ok, you made it. You are ready to install SharePoint!!

    Back at the SharePoint 2013 splash, click Install SharePoint Server to get rolling.


    [Should determine target file location before installing]

    After SharePoint is installed, we are then ready to configure.  When the installer opens the Run Configuration Wizard page,

    Configure SharePoint



    Rather than use the SharePoint configuration wizard, we will use PowerShell to configure the farm. In the past, I have run a custom script to configure the farm to Central Admin (and then separate scripts to configure services).  There are many blogs out there covering that topics, but I recently discovered  AutoSPInstaller (thanks Jody Finch Smile). I have yet to try it, but it looks promising!


      Patch Management

      After getting everything installed and configured, check your windows updates.  At time of writing, the March PU (public update) was available for download.  See TechNet for more details.


    So, to recap… before getting stuck into your install, you need to:

    • Plan and provision your service accounts
    • Get your servers ready
    • Get SQL ready
    • Install and configure
    • Get your updates on

    Good luck!

    Categories: SharePoint Tags:

    Adding the last modified date on a publishing page

    February 6, 2013 Leave a comment


    A comment requirement for corporations is to display the modified date of a publishing page on the actual page itself.  The way we do this is to add a placeholder on the master page that we populate in the page layout.

    To add the field, use the following code:

    <SharePointWebControls:DateTimeField id="pageContentUpdate" FieldName="Modified" runat="server"/>

    I highlighted the field type DateTimeField, because you can actually display the field using the standard FieldValue type as follows:

    <SharePointWebControls:FieldValue id="pageContentUpdate" FieldName="Modified" runat="server"/>

    This worked great, until I realized the time displayed on the page layout was 5 hours behind the actual modified date Disappointed smile.

    Categories: SharePoint Tags:

    Live Writer Draft Folder

    November 21, 2012 1 comment

    So I recently moved all my documents to SkyDrive – love it.  Can get to them from all machines, including Android, windows phone and Surface.  Then I rebuilt my machine and all my docs were right there… except for the hundreds of draft blogs that I never posted.  Now you can imagine the state of panic I was in, given that I am a frequent semi-annual blogger!

    Live Writer, great and all as it is does not give you an option to specify your folder to store blog files.  It’s <user>\documents\My Web Logs and that’s it.

    So a little bit of Bingaling and I found how to change this through the registry (thanks to Larry).

    It’s a quick modification to the following registry key:

    HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer\PostsDirectory

    By default this key does not exist, so you will need to create it.

    1. Open up regedit

    2.Navigate to HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer

    3. Right click on the “Writer” folder in the left pane and choose New > String Value

    4. Name the value PostsDirectory and then double-click on it to edit

    5. Enter your new location (<user>\SkyDrive\LiveWriter for example)

    6. Save


    Alternatively you can do it through PowerShell:

    New-ItemProperty “HKCU:\Software\Microsoft\Windows Live\Writer” -Name “PostsDirectory”  -value “C:\Users\<user>\SkyDrive\Live Writer”



    Categories: Uncategorized Tags:

    SharePoint 2013 Farm setup–and we are off!

    September 16, 2012 Leave a comment

    Applies to: SharePoint Server 2013

    Like many other SharePointies, I’ve decided to setup a lab environment so I can play around with the new features first hand. 

    Lucky, my mate Andrew Connell has an excellent guide on getting setup for a development environment.  This takes you through the process from end-to-end. 

    I already have a Hyper-V environment and a dedicated SQL server, so I could skip stright to installing SharePoint.

    I created a new vm using Windows Server 2012 as the OS.  I still don’t get why MS do not include buttons instead of requiring the mouse to be in specific location of the bottom left/right corner.  The majority of admins remote to their servers, so this is nothing but a pain.  Anyways, enough about that, Microsoft probably spent millions over this very topic, so I’ll just suffer until popular demand forces them to add them in an a service pack Smile.


    My plan is to follow best practices and use an install account and a farm account to get started.  The install account has dbcreator and security admin roles in SQL.

    After successfully running the pre-config and getting all the required roles and bits in place, I ran the installer. All is good so far. Next I get to configure SharePoint 2013.  For 2010, I would skip to using PowerShell at this point, but I want to see what the config wizard does for SharePoint 2013.

    Oh look, you can define your Config database name.  how novel!  I do that, and provide the rest of the configuration values and of I go.

    Configuration Failed

    An exception of type Microsoft.SharePoint.SPException was thrown… This SQL Server instance does not have the required “max degree of parallelism” setting of 1.  Database provisioning operations will continue to fail if “max degree of parallelism” is not set to 1 or the current account does not have permissions to change the setting.

    See my other post on this issue and how to get over it.

    The configuration wizard takes several minutes to run (more than 10 for me).  Yay.  Configuration completed without error.  Lets see what databases it created:

    Configuration database: SP2013_Config

    Admin contnet db: SharePoint_AdminContent_93725166-c75a-4e48-8bae-445bab7ffad7

    Ugh. Again with the GUIDs.  Ok, back to Central Admin. 

    First Question: Do I want to sign up for the customer experience Improvement Program.  No. 

    Second Question: How do you want to configure your SharePoint farm? Wizard or manually?

    Again, I’d normally do this with PowerShell, but I want ot see how te wizard does, so wizard it is.



    The following services are configurable using the wizard:

    • Access Services 2010
    • Access Services
    • App Management Service
    • Business Data Connectivity Service
    • Excel Application Service
    • Lotus Notes Connector
    • Machine Translation Service
    • Managed Metadata Service
    • PerformancePoint Service Application
    • PowerPoint Conversion Service Application
    • Search Service Application
    • Secure Store Service
    • State Service
    • Usage and Health Data Collection
    • User Profile Service Application
    • Visio Graphics Service
    • Word Automation Services
    • Work Management Service Application

    I also specify a dedicated services application account.  Though the services wizard only allows you to specify one service account, in a production environment, I would use several.

    Other than Access, BDC, Lotus notes Connector, Machine Translation, PerformancePoint, PowerPoint conversion, and Word Conversion, I am going to have the wizard create the rest.

    I click Next and get this:


    SharePoint 2013 is now working on it and is sorry to keep us waiting. Disappointed smile

    Glad to see the following hasn’t changed from 2010.  My buddy James Sturges crack us every time he sees this.


    It take a while for the wizard to complete.  But you will know it’s working as you watch several database with GUIDs in the name get created.  Lovely.


    Eventually, you are asked to create a site collection.  I’m going to go ahead and create one at the root site. I’m going to use the 2013 experience and use the publishing portal template.



    After the site collection wizard is complete, I am brought back to Central Admin home page.

    I browse to the new site collection to make sure it’s up…




    Ok, that’s it for the Farm configuration.  ‘til the next SharePoint 2013 post…

    Categories: SharePoint