Monday, January 23, 2017

Export and Import SitePages Library in SharePoint

As all we know about SitePages Library in SharePoint. This Library contains both wiki and webpart pages. We can able to export and import this library using powershell script. Here is the powershell script to export library

Export-SPWeb -Identity "http://yoursiteurl" -ItemUrl "/LibraryName" -Path "c:\temp"

Import-SPWeb  -Identity "http://yoursiteUrl" -Path "C:\temp\filename.cmp"

Thursday, September 22, 2016

Queue Job Status shows "Waiting to be processed" and then never completes

We may get this issue while checkin the project. We can't do anything when we got this message. Project sever will allow you to edit the task once the project checked in. 

Solution for this issue:

  • Goto Services
  • Restart Microsoft Project Server Queue Service 2013 
Check in process will work once you refresh it.

Tuesday, July 19, 2016

Create Custom Page Layout in SharePoint 2013

Introduction

As well know about page layout in SharePoint. Now i am going to give steps to create custom page layout.

Design Manager

We will use design manager to create page layout.  Here is the steps
  • Site Settings -> Design Manager
  • Click Edit Page Layouts
  • Click Create a page Layout
  • Give name for page layout ,masterpage to inherit and content type of page
  • Click Ok
  • New page layout will be displayed in Master Page Gallery and Edit Page Layout page

The page layout is in draft state by default. It will not display in page layout dropdown if it is in draft mode. We have to change this as publish version. Then only page will be displayed.

For making changes to page, we have to change the .html file. Download the .html file and make the changes. upload again in master gallery.

Then, Go to Pages Library. Click Pages in New Document Menu

We can find our custom page in page layout section.

Monday, July 18, 2016

Cannot rename old site on restore


Some of us may face this "Cannot rename old site on restore" error while restoring Site in SharePoint. There may several reason to get this type of error. I am going to say about one of the reason to get this error. 

That's Long URL problem with Libraries and List attachments. Some of the URL can't be restored due to long URL. Here is the steps to find those long URL items.

  • Open the Content Database in SQL
  • Right click the DB and select New Query
  • Paste the below query
    SELECT
   CONCAT([DirName], N'/', [LeafName]) AS [FullRelativePath],
   LEN(CONCAT([DirName], N'/', [LeafName])) AS [Length]
    FROM
   [dbo].[AllDocs]
    ORDER BY
    [Length] DESC

  • We will get the Long URL Libraries and List items
  • Then go to that library / list
  • Delete the Library / List from site. It will be in Recycle bin. No need to worry about that
  • Then take new backup of your site and try to restore it
  • Restore the deleted library / list from recycle bin once site has been restored successfully

Thursday, June 23, 2016

To avoid Threshold for list in SharePoint 2013

Introduction

As all we know about Threshold in SharePoint. It is setting limit to view the list items. Threshold for normal user 5000 and 20000 for admins. If particular list exceeds this limit, then items will not be displayed in listview. We have 2 alternate options to resolve this. Let see one after one.

SPList.EnableThrottling

This option normally in true state for every list. If we disable this, List doesn't consider about threshold value. So List view will display items when list items exceeds threshold limit. Execute the below powershell script to disable this option. (But we have to consider about performace while running with huge amount data in list)

$web = Read-Host "Enter site URL : "
$spweb= Get-SPWeb $web
$listname = Read-Host "Enter List Name:"
$list = $spweb.Lists[$listname]
$list.EnableThrottling = $false
$list.update()
Write-Host "Throttling has been disabled..." -ForegroundColor Green

Daily time window for large queries

We are having this option in Request Trotting. We have a timer option in it. We have to set the time when and how long it will be visible. But we have to consider about performance, when we give long duration.


Tuesday, April 19, 2016

visual upgrade failed _catalogs/masterpage/v4.master

We may face this error while doing visual upgrade for migrated site. Here is the steps to resolve this error.
  • Create a new subsite under migrated site
  • Copy the v4master from Site Settings -> Galleries -> Master Pages
  • Then upload this master page in top level site
  • Now visual upgrade will be working fine

Thursday, April 7, 2016

Attach Content Database with SharePoint WebApplication


I am going to explain how to attach a content database with SharePoint Web Application. Follow the below steps to attach DB

  • First Restore the content database in local sql server
  • Open the powershell, first test the db for safer side. Give  Test-SPContentDatabase -name yourcontentdbname -WebApplication "yourwebapplication"
  • It will give some exception if the DB is not attachable with web application
  • Then mount the database,  Mount-SPContentDatabase "yourcontentdbname" -WebApplication yourwebapplicationname
  • It will show the progress of mounting DB
  • We will get 100% notification once DB mounted