Posts Tagged ‘SharePoint’

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 User Information list is not being updated

March 2, 2012 1 comment

There are many blogs out there explaining the various locations of user properties in SharePoint. Mainly the UPA and the site collections hidden list called the User Information list (http://<SiteCollectionUrl>/_catalogs/users/detail.aspx)

When a user hits this site collection, they will automatically get a profile entry in this list.  Ok, great.  But you have profile properties in two places now, the site collection(s) and the User Profile Service Application; how are you supposed to keep them in sync?

As it turns out, SharePoint thought of that and gives us two timer jobs to do exactly that.  These timer jobs are the User Profile to SharePoint Full Synchronization, and the User Profile to SharePoint Quick Synchronization.


Nice, were good then.  Ok, so what happens when they don’t sync? 

I recently did a migration where we moved 2007 databases to a 2010 farm.  The profiles moved over fine as did the permissions.  However neither the quick or full sync, would work.  It did at one point, but promptly stopped.  No amount of manually running the timer job made a slight bit of difference.

No problem, I’m sure there’s a PowerShell script for that. Nope.  Couldn’t find anything.

So how does SharePoint keep the site collection user lists and the UPA profiles in sync?

When the timer job updates the site collections with the profile properties, it maintains the sync details in a table.  Each database will have a sync table containing this information.  Stsadm.exe provides a command (sync) to view these tables:

Stsadm.exe –o sync –listolddatabases 0

This will display all the databases and when they have been sync’d last.



The sync command also allows you to clear these tables:

Stsadm.exe –o sync –deleteolddatabases 0

Funny thing is it doesn’t actually delete databases, just  the sync info.  The team that named this param were having a right laugh.

Anyways, running this will basically tell the timer jobs that they have never sync’d and force them  to carry on as if it’s the first time.

Make your way over to the timer Jobs page under Monitoring in Central Admin and fire off the User Profile to SharePoint Full Synchronization job.  It will take a lot longer to run this time and should fix the sync issue.

So once again stsadm.exe comes to the rescue. 

If that still doesn’t’ work, you can try Gary Lapointes blog on re-writing them using PowerShell.

SharePoint Build: 2010 SP1 June CU refresh (14.0.6109.5002)

Categories: SharePoint Tags: ,

Hiding the Newsfeed Settings in the Edit Profile Page (and a little on Profile Sub-Types)

I had a need to hide the Activities I am following section in the edit profile page.  The reason was, we did not want to roll this out initially, but we still needed the social framework for other stuff.

If you remember, when you go to the bottom of the Edit Profile page, you will see a section called Newsfeed Settings


Now, lets take a look at this section in central admin under Manage User Properties (under the User Profile Service Application management page). Hover over the Newsfeed Settings title and select Edit to edit it’s properties.


Here you will see that this section is associated with the Sub-type of Profile called Default User Profile Subtype


Trying to deselect this will throw an error, as it has to be associated with some Sub-type.  So lets create another sub-type.  From the Manage Sub-types page, we create a new Sub-type called No Newsfeed.



Now if we go back to edit the Newsfeed Settings section in Manage Properties, we can dis-associate this section from the Default User Profile Subtype.


Save everything and now go back to the Edit profile page (give it a minute to catch-up).  No more Activities I am Following section!

Categories: SharePoint Tags:

Hide “Personalize This Page” option for SharePoint site

April 28, 2011 1 comment

SharePoint allows you to create a personalized version of a web part page.  This means you can add/remove web parts or modify some web part properties that allow personalization changes.


So you don’t want your users to be able to personalize pages?  Here’s how.

Central Admin –> Web applications

Select the web application you want to apply changes (sadly this is changes applies to the full web app).


Scroll to the bottom of the list of options and observe the last two.



Clear the options “Add/Remove Personal Web Parts” and “Update Personal Web Parts”, to prevent the user personalizing the web part page.

Now the user cannot personalize the page!


Categories: SharePoint Tags: