Unable to create document from custom content type, using document template #9171
Closed
1 of 9 tasks
Labels
type:bug-suspected
Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
type:invalid-not-dev-issue
This repo+issue list is for SharePoint development topics. Non-dev issues will be closed.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
not applicable
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
No response
Describe the bug / error
If we create a content type in the Content Type Gallery and specify a document template URL, the content type cannot be used to create a new document in a library using the "New" menu (after pulling the content type in to the libary). The users have read access to the document template.
When selecting the content type from the "New" menu, a tab is opened and then immediately closed. Upon inspection, the following error is found in the console:
The document template is stored in a different site, to the site in which the content type is being used e.g.
Template URL: /sites/Templates/Shared Documents/Short document template.dotx
Library: /sites/Testteam/Shared Documents
The content type is pulled from the Content Type Gallery, with the document template URL property already filled in.
This also occurs if you upload the document template to the content type within the Content Type Gallery and then pull that content type down to the site. This leads to a synchronisation error which can be found in the Content type publishing error log:
When using the "New" menu it seems that the GetListUsingPath API call, is unable to handle a server relative URL that refers to a document template in another SharePoint site.
The alternative of uploading the document template to the content type via the gallery, doesn't seem to work because the file is not synchronised to sites when the content type is pulled down.
Steps to reproduce
Expected behavior
After clicking the content type from the "New" menu, a new document will be created using the document template for that content type.
The text was updated successfully, but these errors were encountered: