0

I'm building a SharePoint online communication site, but when I try to save a page as template or publish a page using defined page templates saved before, it gives me the following error:

REST error Error with code -2147024809, System.ArgumentException due to Inner-Message: Value does not fall within the expected range. Exception-Message: [HTTP]:400 - Bad Request [CorrelationId]:e3c3a69f-a019-b000-a2dc-4a074ad75594 [Version]:16.0.0.20913 at Error: Inner-Message: Value does not fall within the expected range. Exception-Message: [HTTP]:400 - Bad Request [CorrelationId]:e3c3a69f-a019-b000-a2dc-4a074ad75594 [Version]:16.0.0.20913 at new t (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_6aa2fc520591708ec0b2ff861ee40b72.js:1:329724) at Function.e._getOdataRestApiError (https://modern.akamai.odsp.cdn.office.net/files/sp-client/chunk.sp-pages-statemanager_en-us_e9b99b9a155c33296e29.js:1:20936) at https://modern.akamai.odsp.cdn.office.net/files/sp-client/chunk.sp-pages-statemanager_en-us_e9b99b9a155c33296e29.js:1:23643}

does someone have idea how i can fix this error? Thanks a lot!

1 Answer 1

0

Here is a similar case for your reference:

[SharePoint Online] Modern page creation failure with custom template and content type

Of course, you could try to following steps to save page as template:

  1. Connect to SharePoint Online using PowerShell and set denyaddandcustomizepages of the site to false.

    $adminUPN="[admin]@[tenant].onmicrosoft.com"

    $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."

    Connect-SPOService -Url https://[tenant]-admin.sharepoint.com -Credential $userCredential

    set-sposite https://[tenant].sharepoint.com/sites/[communication/team] -denyaddandcustomizepages $false

  2. We can save the site (modern team site and communication site) as the site template by visiting /_layouts/savetmpl.aspx page.

enter image description here

  1. Then, you can access /_catalogs/solutions/Forms/AllItems.aspx page and view your template.

enter image description here

2
  • thank you so much for your answer! Unfortunately I don't have the admin access to the website..
    – Leonie
    Commented Feb 2, 2021 at 18:00
  • Hi, Leonie. Enable save site as template on SharePoint online. User account needs to have Full permission to access the site. Commented Feb 3, 2021 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.