Tag Archives: Debugging

Document Icon Link in SharePoint List not working


Clicking on a document icon does not link you to the document.


Microsoft has published a fix for this issue. Create a file called fldtypes_docicon.xsl and copy the XSLT code supplied by Microsoft into the file. Move the file to the following location:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\XSL

Code and instructions available at:


Comments ( 0 )

Update SharePoint Alerts URL after Database Attach Upgrade


You perform a database attach upgrade from a 2007 farm to a 2010 farm. You decide that you want to use a different URL for the web application. After performing the upgrade, you realise that all the alerts on the web application still use the old SharePoint URL.


Use a powershell script to update the alert URL in your entire web application.

get-spsite -limit all -WebApplication http://portal | get-spweb -limit all
|ForEach-Object {$_.alerts|foreach-object{$_.properties[“siteUrl”] =


Comments ( 0 )

June 2011 CU Woes – Workaround for InfoPath forms error


After installing June 2011 CU for SharePoint 2010 Server, you start to get errors in your InfoPath form. After disabling Security Validation in the Web Application General Settings, you realised that you cannot create anything from the UI.


As a work-around, you need to modify FormServer.aspx located under \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS and add the line in bold:


<body runat=”server” id=”PageBody”>
<SharePoint:FormDigest runat=”server” />

Do an IISRESET and the error should disappear.


Comments ( 1 )

Using Get-SPLogEvent to retrieve logs based on correlation id

As an administrator, one of the most common tasks I get is to troubleshoot “unexpected errors”. While the ULS log viewer is very handy, the log files are very large and tedious to go through (especially in a live environment).

Most errors in SharePoint come with a correlation ID. As long as you have this, you can locate more details about the error in the ULS logs.

A handy way to find an error that just occurred based on correlation ID is to use the following powershell command:

get-splogevent -starttime (get-date).addminutes(-20) | where-object { $_.correlation -eq “b66db71a-3257-4470-adf9-5c01dc59ecb3” } | fl message > c:\errors.txt

This will output all errors from within the last 20 minutes with correlation id b66db71a-3257-4470-adf9-5c01dc59ecb3. The output is written to c:\errors.txt.

Browsing the text file shows the following output:
Message : Leaving Monitored Scope (SiteAndWebCache.DoesUserHavePermission). Exe
cution Time=25.0330698454692

Message : SQL Query Count The SQL queries performed during this operation.

Message : Unknown SPRequest error occurred. More information: 0x80070002

Message : Data adapter failed during OnLoad: The form cannot run the specified
query. The list could not be found.

Comments ( 3 )

The security validation for this page is invalid


After applying SharePoint 2010 Service Pack 1 and June 2011 Update, you start getting an exception “The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.” in your InfoPath forms when you try to do certain actions like adding an attachment to the form.

Checking the ULS logs, you see the following error:

Message : Failed to get SPGroupName from GroupID. Error Message: Group cannot b
e found.  Callstack:    at Microsoft.SharePoint.SPGroupCollection.Get
ByID(Int32 id)     at Microsoft.SharePoint.WebControls.PeopleEditor.s
et_SharePointGroupID(Int32 value).


This is a known bug in the June 2011 update and there is no known fix from Microsoft at the time this post is written.


The work-around is to disable Web Page Security Validation  in the Web Application settings.

  1. Open Central Administration -> Manage Web Applications -> General Settings
  2. Web Page Security Validation -> Off.
  3. OK

Note: This work-around causes issues with InfoPath form postbacks and creating document libraries / subsites. Use the following guide instead to fix this issue:



Comments ( 0 )