Category Archives: SharePoint

SPException “The collection cannot be modified.” when calling SPContentType.Update()

If you are getting the SPException “The collection cannot be modified.” when calling SPContentType.Update() then ensure that the content type you are updating was not retrieved from the SPWeb.AvailableContentTypes collection. Content types retrieved from this collection (as oppose to SPWeb.ContentTypes) are … Continue reading

Posted in Content Types, SharePoint, SharePoint 2010 | 7 Comments

Making web requests to external sites from SharePoint

In most enterprise settings you will need to go through a proxy server to connect to external sites. In Windows the proxy settings in IE actually affects the apps on that machine. If you write a console app to test … Continue reading

Posted in SharePoint | 2 Comments

Weird rendering behaviour in SharePoint with self-closing DIV tags

I was doing branding in SharePoint 2010 and noticed that SharePoint will render elements declared after a self-closing DIV as children of that DIV. So, if my master page has something like this: The page will be rendered as: Changing … Continue reading

Posted in Branding, SharePoint | Leave a comment

Can’t get RemoveFieldRef in your custom content type schema to work?

Check that: The Inherits attribute in <ContentType> is FALSE Check the casing of the GUID specified in <RemoveFieldRef>. My testing shows that this is case-sensitive. On the latter point above, it is best to write a harness program to check … Continue reading

Posted in Content Types, SharePoint | Leave a comment

Tip for deploying workflow template with InfoPath task form

Maybe because I’m a newbie, but I ran into a lot of problem trying to deploy a workflow template with an InfoPath task form. The trick is in your feature receiver and your feature properties (in the XML definition). The best … Continue reading

Posted in SharePoint, SharePoint 2010, Workflow | Leave a comment

SharePoint Evil #4: Document Information Panel always defaults to first content type in the library

A SharePoint Evil is an issue/error that is so ambiguous and misleading that Google will shows 50 hits, with 10 different suggested solutions, and none of them work for your particular case. (So the described below may not work for you … Continue reading

Posted in Document Information Panel, SharePoint, SharePoint 2010, SharePoint Evils | 7 Comments

How to find ID of site column using the SharePoint UI

You can work out a number of things by looking at the various out-of-the-box URLs in SharePoint. For example, to work out the ID of a content type, go to the content type gallery, hover over a content type, and … Continue reading

Posted in SharePoint | Leave a comment

Can’t disable customErrors in SharePoint

There are 3 setting changes you need to make to the SharePoint web.config to show the real error messages and call stack – rather than the out-of-the-box message that is often very vague and unhelpful for troubleshooting. The other day … Continue reading

Posted in SharePoint | Leave a comment

SharePoint Evil #2: The URL ‘[url]’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web – The 2nd Scenario

A SharePoint Evil is an issue/error that is so ambiguous and misleading that Google will shows 50 hits, with 10 different suggested solutions, and none of them work for your particular case. (Eeerr.. so what’s described below may not work for … Continue reading

Posted in SharePoint, SharePoint 2010, SharePoint Evils | 10 Comments

SharePoint Evil #1: The URL ‘[url]’ is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web

I’m compiling a list of evil SharePoint errors: those errors that are so ambiguous and misleading that Google will shows 50 hits, with 10 different suggested solutions, and none of them work for your particular case. Here is #1: The … Continue reading

Posted in Content Types, Custom Fields, Lookup Columns, SharePoint, SharePoint Evils | 3 Comments