Skip to content

File doesn’t exist error when setting Document Template for Content Type

June 7, 2011

Simple error, simple solution:

Can be annoying when you want to assign a document template for a SharePoint content type with copy-pasting the URL into the Document Template field on Content Type Advanced Settings page (/_layouts/ChangeContentTypeOptionalSettings.aspx) and you get the following error:

File doesn’t exist at Microsoft.SharePoint.SPContentType.set_DocumentTemplate(String value)
at Microsoft.SharePoint.ApplicationPages.ChangeContentTypeOptionalSettingsPage.UpdateContentType()
at Microsoft.SharePoint.ApplicationPages.ChangeContentTypeOptionalSettingsPage.OnSubmit(Object o, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

If you copy-paste the same URL into the browser’s address bar it works fine.
Possible solution: remove a trailing space from the URL. That is not trimmed by SharePoint so it cannot open the URL .

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: