Category Archives: Template

Access Denied Content Type Policy Templates

access denied content type policy templates

I was getting access denied error while creating content type policy template in sharepont online. i tried the solution as below to resoleve the issue. let’s disucss how to resolve access denied content type policy templates error. the solution is applicable for the error Access denied uploading template to content type.

Advertisements
Advertisements
  • Navigate to site settings in sharepoint and click on “content type policy template” to create a custom policy template.
site settings option in sharepoint online for the error access denied content type policy templates
site settings in sharepoint

Error “access denied content type policy templates” screenshot as below

access denied content type policy templates
access denied error while creating content type policy templates
Advertisements
Advertisements

Solution

Enable below settings in sharepoint admin center.

  • Allow users to run custom script on personal sites
  • Allow users to run custom script on self-service created sites
enable custom script sharepoint online
enable custom script sharepoint online

Enable Custom script in site

next step to enable cutom script in site using powershell

Connect-SPOService -Url <sharepoint admin center url>
Set-SPOSite -Identity <site url> -DenyAddAndCustomizePages 0

watch the video below to see all steps for your reference

Advertisements
Advertisements
Advertisements
all-webs-and-site-templates-1920x1080

View all webs and site templates under site collection

View all webs and site templates under site collection

We can get all webs and site templates under site collection by using the below small script.

$site = Get-SPSite “http://win2016:37344/sites/SPmcse”
foreach ($web in $site.AllWebs){
$web | Select-Object -Property Title,Url,WebTemplate
}
$site.Dispose()
all-webs-and-site-templates-1317x299
Display template SharePoint Server 2013 1920x1080

Display template SharePoint Server 2013

Display templates for the Content Search Web Part

You can use the following Display template SharePoint to change the appearance of content that is shown in a Content Search Web Part. These display template files are located in the Content Web Parts subfolder in the Display Templates folder in the Master Page Gallery.

template-contentsearchwebpart

Display templates for the Refinement Web Part and the Taxonomy Refinement Web Part

You can use the display templates listed in the following table to change the appearance of content that is shown in a Refinement Web Part and a Taxonomy Refinement Web Part. These display template files are located in the Filters subfolder in the Display Templates folder in the Master Page Gallery. Note that there are different display templates for different refiner types.

template-webpart

Display templates for the Search Results Web Part

You can use the display templates in the following table to change the appearance of content shown in a Search Results Web Part. Note that the hover panels for the different result types have separate display templates. These display template files are located in the Search subfolder in the Display Templates folder in the Master Page Gallery.

template-search1
template-search2

Advertisements

Advertisements

New APP created once "Project Functionality" feature is activated.

Activate site Features create APP in Site Contents SharePoint2016

Today I successfully installed SharePoint Server 2016 on-premises overcoming few errors related to prerequisite as per my previous posts.

You can see below previous posts :

  1. Windows Server Appfabric: Installation error SharePoint 2016
  2. Cannot connect to database master at SQL Server at server_name. The database might not exist, or the current user does not have permission to connect to it Error SharePoint 2016
  3. Failed to create configuration database. An exception of type Microsoft.SharePoint.Upgrade. SPUpgrade Exception was thrown. Additional exception information: One or more types failed to load. Please refer to the upgrade log for more details Error SharePoint 2016
  4. Program can’t start because api-ms-win-crt-heap-l1-1-0.dll is missing SharePoint2016
  5. Unable to install Microsoft Information Protection and control Client 2.1 error SharePoint 2016

Here I am very excited to let you know the “SharePoint APP” created in “Site Contents” by activating the “site feature“.

you may take it very easy but its not as simple as to resolve issues sometimes, that time it will help you a lot.

a. “Default APP” once site is created, before activating any feature.

Default APP in Site Contents with no feature activate

Default APP in Site Contents with no feature activate, once site is created

b. New APPs  added in Site Contents  after “Publishing Feature” is activated

New APPs added in Site Contents after

New APPs added in Site Contents after “Publishing Feature” is activated

c. New APPs  added in Site Contents  after “Content Organizer” feature is activated.

New APPs added in Site Contents after

New APPs added in Site Contents after “Content Organizer” feature is activated.

d. New APPs  added in Site Contents  after “Community Site” feature is activated.

Site-Contents-Community-Site-Feature-activate

Site-Contents-Community-Site-Feature-activate

e. New APPs  added in Site Contents  after “Site Feed” feature is activated.

New APPs added in Site Contents after

New APPs added in Site Contents after “Site Feed” feature is activated.

f. New APPs  added in Site Contents  after “Project Functionality” feature is activated.

New APP created once

New APP created once “Project Functionality” feature is activated.

amazon     amazonsp2016  amazonsp2016_2

save site as template publishing site 1920x1080

Save site as a template publishing site SharePoint 2013





Save site as a template


Save site as a template publishing site

We all know that SharePoint doesn’t support saving publishing sites as a template. I don’t recommend doing that anyway as the produced template will have errors and isn’t reliable to be used in production to create new sites off of. However, sometimes as a developer you need to save a publishing site as a template to see how SharePoint packages things. This can help you build your own custom web template which is a neat thing and replaces the need to save a publishing site as template.

Well, since the Save site as a template option is hidden from the publishing sites settings page we all used the following URL to go there directly:

/_layouts/savetmpl.aspx
Or
/_layouts/15/savetmpl.aspx

Well, that is not going to work anymore in SharePoint 2013 if your site is a publishing site or have the publishing features activated. You basically get that following error: The “Save site as template” action is not supported on this site.

ErrorSaveSiteAsTemplate Save site as a template

In order to get around this issue you need to update a single property page value in your SPWeb object for the site you are trying to save as a template and you are good to go. The property is called SaveSiteAsTemplateEnabled. We need to set that property to true that’s all. This can be done in powershell.

Advertisements
Advertisements
# Get a reference to the target site
$web = Get-SPWeb http://Intranet.SPmcse.com/Publishing

# Update the property bage value and set it  to the string value “true”
$web.AllProperties[“SaveSiteAsTemplateEnabled”] = “true”

# Commit the property change to server
$web.Update()
save site as template powershell

Now if you navigate to the Save site as a template page using the URL directly it will show fine and it will allow you to save the site as a template which stores a copy in the Solution gallery of the site collection. Make sure you have enough space in your C drive temp folder because it uses that location as a staging directory.