Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create document from custom content type, using document template #9171

Closed
1 of 9 tasks
CallumCrowley opened this issue Aug 31, 2023 · 3 comments
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.

Comments

@CallumCrowley
Copy link
Contributor

CallumCrowley commented Aug 31, 2023

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

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

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:

image

image

chrome_0TObEjJOVM

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:

image

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

  1. Create a custom content type in the Content Type Gallery, inheriting from the Document content type.
  2. Open the content type in the Gallery and click Settings and then Advanced settings
  3. Enter a URL of document template stored in a SharePoint site in your tenant. Ensure that you have access to this site and document template.
  4. Navigate to a library in a separate site to where your template is stored.
  5. Click the "+Add column", scroll to the bottom and click "Add a content type", then click Next.
  6. Choose the content type you created in step 1 and apply.
  7. Use the New menu and attempt to create a document using the content type.

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.

@CallumCrowley CallumCrowley added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Aug 31, 2023
@ghost
Copy link

ghost commented Aug 31, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 Awaiting categorization and initial review. label Aug 31, 2023
@nick-pape nick-pape added type:invalid-not-dev-issue This repo+issue list is for SharePoint development topics. Non-dev issues will be closed. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. type:invalid Issue doesn’t belong in this repo as it’s not relevant. Will be closed. and removed Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. type:invalid Issue doesn’t belong in this repo as it’s not relevant. Will be closed. labels Sep 5, 2023
@nick-pape
Copy link
Collaborator

Thank you for your submission. As explained in our wiki (Issue List: What doesn't belong in the issue list), this issue list is for SharePoint developer/development issues. All capability question/discussion questions, or topics related to SharePoint administration & end-user topics should be reported through the support user interface available in the tenant admin settings. You can also have a discussion and ask questions at the SharePoint TechCommunity forum. You can learn more about this in our wiki: type:invalid-not-dev-issue

@ghost
Copy link

ghost commented Sep 21, 2023

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@ghost ghost locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.
Projects
None yet
Development

No branches or pull requests

2 participants