Archive for March, 2013

PerformancePoint Services error in SharePoint 2010 – code blocks are not allowed in this file

Resolve PPS error below, received when launching Dashboard Designer on a SharePoint 2010 site:

An error occurred during the processing of /sites/sitecollection/BI/Pages/ppssample.aspx. Code blocks are not allowed in this file.

One common solution is to add an exception for the site in question to the web.config:

<PageParserPath VirtualPath="/ /Pages/ppssample.aspx” CompilationMode=”Always” AllowServerSideScript=”true” />

From http://www.jstevensblog.com/post/PerformancePoint-2010-error-resolved-Code-blocks-are-not-allowed-in-this-file-SharePoint-2010.aspx

However, I was not very comfortable with modifying the web.config for a single site collection, plus it doesn’t seem to scale very well – what if I have 100 PPS sites with this problem?

So I did a little more searching online and found the following alternative solution: http://oszakiewski.net/eric/performancepoint-error-code-blocks-are-not-allowed-in-this-file .

The solution is to open the ppssample.aspx in SP Designer and modify a function within the code. I had to adjust the syntax a bit – the blog post syntax was not working for my case. See underlined section below.

My site collection URL is …/sites/sitecollection

The PPS site that’s having the problem is …/sites/sitecollection/BI

So my function looks like this:

function OpenDD()
{ULSrFH:;
var designerRedirect = “_layouts/ppswebparts/designerredirect.aspx”;

    var siteCollection = “/sites/sitecollection/”;


    var siteLocation = “/sites/sitecollection/BI/”;


var siteCollectionUrl = location.protocol + “//” + location.host + siteCollection;
var siteLocationUrl = siteLocation.replace(siteCollection,””);
designerRedirect = siteLocation + designerRedirect + “?SiteCollection=” + siteCollectionUrl + “&SiteLocation=” + siteLocationUrl;
location.href = designerRedirect;
}

It appears to have worked just as well as the first (more common) solution.

Advertisements

RSS Information Week Headlines

  • An error has occurred; the feed is probably down. Try again later.

RSS SharePoint Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS InfoPath Team Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Joel Oleson Blog

  • An error has occurred; the feed is probably down. Try again later.

RSS Susan Hanley’s KM Blog

  • An error has occurred; the feed is probably down. Try again later.

Blog Stats

  • 356,540 hits