Forum Discussion

CallumCrowley's avatar
CallumCrowley
Copper Contributor
Sep 04, 2023

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

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

  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.

  • StewartAShark's avatar
    StewartAShark
    Copper Contributor
    Hi, we have discovered the same issue today. Have you had any luck in identifying a fix?
      • StewartAShark's avatar
        StewartAShark
        Copper Contributor

        CallumCrowley Thanks for the reply I will also raise a ticket to try and get some traction.  Have you an idea when this bug presented? Our environment is stable but only discovered the problem last week.  Been troubleshooting down a culdesac since last Thursday, but bug could have been around since late July 23 when we have evidence of Content Types working as expected.  Surprised there are not more posts if it has been around since July so I suspect it to be a recent change.

  • Hi All

    We are also experiencing this error.

    It has shown itself for us after we tried to change the templates to open in the Web App and not the installed App. It still works using the installed App. It also still works at the library level where the template is stored just not any published sites.

    Hopefully Microsoft get a fix ASAP as we are seeing considerable frustration from our users.

    • StewartAShark's avatar
      StewartAShark
      Copper Contributor

      Hi, 

      I though to post an update.

      We have gone through MIcrosoft Support who have confirmed it is not a problem with our tenant, ut a bigger Microsoft issue.

      The speed of fix is proportional to how much harm it is causing.  If you have this problem please log a ticket with Microsoft Via your tenant, or all your clients tenants.  This was explained as the measure Microsoft use to promote action priorities for know bugs.

       

      Hope it get fixed soon.

       

      • CallumCrowley's avatar
        CallumCrowley
        Copper Contributor
        Thanks for the confirmation. We also showed the bug to Microsoft support, who are now investigating.

Resources