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

Bertrand 31 Reputation points
2020-12-16T08:53:37.693+00:00

Hello,

I'm working with SharePoint Online to create an Intranet with multiple site collections attached to a site hub.
I created a the same page template on every of these sites and set a custom content type to it allowing the users providing custom metadata on these pages (such as the name of the department).

It worked properly until the last friday 12/11/2020 because some users created new pages based on this page template. But, since this Monday (12/15/2020), it is no longer working and all the users are encountering the following error message while saving the page as draft or publishing it:

REST error Error with code -2147024809, System.ArgumentException due to Inner-Message: Invalid data has been used to update the list item. The field you are trying to update may be read only. Exception-Message: [HTTP]:400 - [CorrelationId]:49ca979f-b08b-2000-98d1-94f092ed92c3 [Version]:16.0.0.20802 at Error: Inner-Message: Invalid data has been used to update the list item. The field you are trying to update may be read only. Exception-Message: [HTTP]:400 - [CorrelationId]:49ca979f-b08b-2000-98d1-94f092ed92c3 [Version]:16.0.0.20802 at new t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_35d65bcb05792076e5f4902acd4f9a88.js:1:328581) at Function.e._getOdataRestApiError (https://spoprod-a.akamaihd.net/files/sp-client/chunk.sp-pages-statemanager_en-us_e6cfd72ee4c780ffb2c9.js:1:21063) at https://spoprod-a.akamaihd.net/files/sp-client/chunk.sp-pages-statemanager_en-us_e6cfd72ee4c780ffb2c9.js:1:23770}

While editing the page, if the users click on the "Page details" button, the following error is displayed:

When clicking on Page details to fill custom properties provided by the custom content type :

Can't get page details. There may be a connection issue or other issue. Refresh the page and try again.

Below, you can find the screenshots of the errors and the browser console with all the errors displayed.

48694-error-while-clicking-on-page-details-button.png

48695-error-while-clicking-on-save-as-draft-button.png

48696-browser-console-errors.png

All the errors shown in the browser console and in popup messages seem to be SharePoint internal errors.

These errors occur on every site collection of the intranet.
I tested several things and I found out that if I create a new content type and set it to the custom page template, it works properly. But the thing is nobody did any action on the sites during the weekend and everything is broken now. I have around 25 site collections with several custom content types on each site and I don't want to create them again.
Does any updates has been done by Microsoft on the SharePoint tenants this weekend?

Thank you very much. !

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Marco Santos 86 Reputation points
    2021-01-06T14:23:04.323+00:00

    Ok I've found the solution (well, culprit and workaround to be more precise) for this in the PnP community:

    https://github.com/pnp/pnpframework/issues/53

    You can read the whole thread to get the full picture but it's the user b00johst that provides the solution for both scenarios: making a correct new deployment (remove OOB fieldrefs from site CTs) and fixing an already affected site (fix SelectFilename and LinkTitle in site CT's). I've tested this myself and confirmed it works.

    2 people found this answer helpful.

2 additional answers

Sort by: Most helpful
  1. Echo Du_MSFT 17,316 Reputation points
    2020-12-17T08:04:20.307+00:00

    Hello @Bertrand ,

    You could use the Page Diagnostics for SharePoint tool to analyze page calls.

    The Page Diagnostics for SharePoint tool is a browser extension for the new Microsoft Edge (https://www.microsoft.com/edge) and Chrome browsers that analyzes both SharePoint Online modern portal and classic publishing site pages.

    More information, please refer to the following articles:

    Thanks,
    Echo Du

    ==================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Nico P 1 Reputation point
    2022-03-23T17:54:09.503+00:00

    This can also happen even if you do not use a PnP Module if:

    • A lookup column pointing to a nonexistent list and after removing it would cause this. Once you find that missing lookup column will fix your issue.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.