Nowadays I’m working quite a lot with Project Server 2013. One of my tasks is to create a customized project web site template. A quite good description of the overall process can be read in this post.
In my case the customization should include not only custom lists or navigation items, but more advanced design features as well. For example, the site should have a breadcrumb, that we can enable using SharePoint Designer (SPD) via editing the master page as described here. So let’s start SPD, and try to edit the master page of a project website! You will receive a warning:
Page Editing is Disabled
This web site has been configured to disallow page editing with SharePoint Designer.
Contact your web site administrator for more information.
It seems to be a by design feature, as stated here:
“An administrator or designer can accidentally break the whole functionality of the site by incorrectly modifying pages at the root web of a Project Site.”
Yes, it is of course possible to accidentally break the whole functionality of the site if one incorrectly modifies pages, but IMHO it should be the responsibility of the administrator to decide if such modifications should be disabled or not.
Some of the workarounds I found on the web (like this one) suggest altering the out-of-the-box site templates by removing the DisableWebDesignFeatures attribute (see the related Project element in the site schema), or setting the vti_disablewebdesignfeatures2 in the Properties collection of the SharePoint web (like suggested here). However, I have not found the vti_disablewebdesignfeatures2 property at all for the project web site (the value of the allowmasterpageediting property is 1, meaning pages should be theoretically editable), and did not want to alter any of the default templates. Is there a better way to make the pages / site editable?
From this post I’ve learned that this behavior is caused directly by a server response when opening a web site with SPD. The HTTP response (sent by _vti_bin/_vti_aut/author.dll, see the related entries in the FrontPage Server Extensions here) includes
<li>vti_disablewebdesignfeatures2
and next the list of disabled features, like
<li>VX|wdfopensite
that will disable opening the site in SPD, or in our case:
<li>VX|wdfeditpages
that will disable “only” page editing.
Having this information I came up quickly with my own solution to the problem, namely using Fiddler to alter the response sent by the server on the fly. In the CustomRules.js we should add the following code block to the OnBeforeResponse method:
if (oSession.HostnameIs("yourserver.com") && oSession.oResponse.headers.ExistsAndContains("Content-Type","application/x-vermeer-rpc")) {
oSession.utilDecodeResponse();
oSession.utilReplaceInResponse(‘<li>VX|wdfeditpages’, ‘<li>VX|’);
}
This code fakes the response, simulating a site that does not disable any kind of editing.
Note: You should replace yourserver.com with the host name of your SharePoint / Project Server site, and wdfeditpages with option(s) returned by the server.
Note 2: I suggest you to restart SPD (if it was running and you’ve already tried to open the problematic site earlier in the session) after you start capturing with Fiddler, as SPD seems to cache the former server responses. You might be requested to authenticate yourself again when opening the site in SPD.