question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid data has been used to update the list item with pnp:ClientSidePage

See original GitHub issue

I am trying to deploy a page template as part of my provisioning template, however when I create a new instance of the the page template after provisioning a new site, am getting this error:

Invalid data has been used to update the list item. The field you are trying to update may be read only.

I have a page content type that inherits from Site Page, with no additional columns, deployed with my provisioning template, its ID is: 0x0101009D1CB255DA76424F860D91F20E6C411800CDB5E46C6094554D9A67815F1F98AB89

First, I have prepared everything in the site using the browser. I created a content type inheriting from “Site Page”, then created a new page using this content type, and saved it as a template. The page template works fine in the original site when I try to create new instances, so I used Get-PnPProvisioningTemplate

The ClientSidePage XML looks like this, it gives me the error above, if I remove the ContentTypeID from the XML, it works fine:


<pnp:ClientSidePage PromoteAsNewsArticle="false" PromoteAsTemplate="true" Overwrite="true" Title="Custom Page Template" ContentTypeID="0x0101009D1CB255DA76424F860D91F20E6C411800CDB5E46C6094554D9A67815F1F98AB89" ThumbnailUrl="" PageName="Templates/MyPageTemplate.aspx">
          <pnp:Header Type="Custom" ServerRelativeImageUrl="https://{fqdn}{site}/SiteAssets/custom/banner.jpg" TranslateX="51.7085751128304" TranslateY="42.1052631578947" LayoutType="FullWidthImage" TextAlignment="Center" ShowTopicHeader="false" ShowPublishDate="false" TopicHeader="" AlternativeText="" Authors="[]" AuthorByLine="[]" AuthorByLineId="-1" />
          <pnp:Sections>
            <pnp:Section Order="1" Type="OneColumn">
              <pnp:Controls>
                <pnp:CanvasControl WebPartType="Text" ControlId="9d15f343-b007-415c-b6e7-580e81dc234e" Order="1" Column="1">
                  <pnp:CanvasControlProperties>
                    <pnp:CanvasControlProperty Key="Text" Value="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur" />
                  </pnp:CanvasControlProperties>
                </pnp:CanvasControl>
                <pnp:CanvasControl WebPartType="ImageGallery" JsonControlData="{&quot;id&quot;: &quot;af8be689-990e-492a-81f7-ba3e4cd3ed9c&quot;, &quot;instanceId&quot;: &quot;76f685e6-c4f4-43b9-ab85-e0670b668c3d&quot;, &quot;title&quot;: &quot;Page Template&quot;, &quot;description&quot;: &quot;Using page template description&quot;, &quot;dataVersion&quot;: &quot;1.8&quot;, &quot;properties&quot;: {&quot;layout&quot;:4,&quot;carouselSettings&quot;:{&quot;autoplay&quot;:false,&quot;autoplaySpeed&quot;:5,&quot;dots&quot;:false,&quot;lazyLoad&quot;:true,&quot;metadata&quot;:true,&quot;swipe&quot;:true},&quot;gridSettings&quot;:{&quot;imageSize&quot;:2,&quot;imageCropping&quot;:1,&quot;imageAspectRatio&quot;:1,&quot;lightbox&quot;:false},&quot;imageSourceType&quot;:1,&quot;isRecursive&quot;:false,&quot;isCdnEnabledForList&quot;:false,&quot;hasDynamicModeEnabled&quot;:false,&quot;maxImagesCount&quot;:10,&quot;images&quot;:[],&quot;canAlwaysSelectDocLibAsSource&quot;:false,&quot;layoutComponentId&quot;:&quot;&quot;}, &quot;serverProcessedContent&quot;: {&quot;htmlStrings&quot;:{},&quot;searchablePlainTexts&quot;:{},&quot;imageSources&quot;:{},&quot;links&quot;:{}}, &quot;dynamicDataPaths&quot;: {}, &quot;dynamicDataValues&quot;: {}}" ControlId="af8be689-990e-492a-81f7-ba3e4cd3ed9c" Order="2" Column="1" />
              </pnp:Controls>
            </pnp:Section>
          </pnp:Sections>
</pnp:ClientSidePage>

My Content Type that is included in the template looks like this:

<pnp:ContentType ID="0x0101009D1CB255DA76424F860D91F20E6C411800CDB5E46C6094554D9A67815F1F98AB89" Name="Custom CT" Description="" Group="Custom" NewFormUrl="" EditFormUrl="" DisplayFormUrl="">
          <pnp:FieldRefs>
            <pnp:FieldRef ID="c042a256-787d-4a6f-8a8a-cf6ab767f12d" Name="ContentType" UpdateChildren="true" />
            <pnp:FieldRef ID="5f47e085-2150-41dc-b661-442f3027f552" Name="SelectFilename" UpdateChildren="true" />
            <pnp:FieldRef ID="8553196d-ec8d-4564-9861-3dbe931050c8" Name="FileLeafRef" Required="true" UpdateChildren="true" />
            <pnp:FieldRef ID="8c06beca-0777-48f7-91c7-6da68bc07b69" Name="Created" Hidden="true" UpdateChildren="true" />
            <pnp:FieldRef ID="fa564e0f-0c70-4ab9-b863-0177e6ddd247" Name="Title" UpdateChildren="true" />
            <pnp:FieldRef ID="28cf69c5-fa48-462a-b5cd-27b6f9d2bd5f" Name="Modified" Hidden="true" UpdateChildren="true" />
            <pnp:FieldRef ID="822c78e3-1ea9-4943-b449-57863ad33ca9" Name="Modified_x0020_By" UpdateChildren="true" />
            <pnp:FieldRef ID="4dd7e525-8d6b-4cb4-9d3e-44ee25f973eb" Name="Created_x0020_By" UpdateChildren="true" />
            <pnp:FieldRef ID="82642ec8-ef9b-478f-acf9-31f7d45fbc31" Name="LinkTitle" UpdateChildren="true" />
            <pnp:FieldRef ID="7efc33c1-b56b-490e-9c9b-1097e971ba96" Name="ClientSideApplicationId" UpdateChildren="true" />
            <pnp:FieldRef ID="daef58d7-ccfd-43fc-b776-2e292cc66bba" Name="PageLayoutType" UpdateChildren="true" />
            <pnp:FieldRef ID="4966388e-6e12-4bc6-8990-5b5b66153eae" Name="CanvasContent1" UpdateChildren="true" />
            <pnp:FieldRef ID="5baf6db5-9d25-4738-b15e-db5789298e82" Name="BannerImageUrl" UpdateChildren="true" />
            <pnp:FieldRef ID="fb3259ac-bd07-4397-b7aa-03e885b0838e" Name="BannerImageOffset" UpdateChildren="true" />
            <pnp:FieldRef ID="3f155110-a6a2-4d70-926c-94648101f0e8" Name="Description" UpdateChildren="true" />
            <pnp:FieldRef ID="f5ad16a2-85be-46b2-b5f0-2bb8b4a5074a" Name="PromotedState" UpdateChildren="true" />
            <pnp:FieldRef ID="c84f8697-331e-457d-884a-c4fb8f30ea74" Name="FirstPublishedDate" UpdateChildren="true" />
            <pnp:FieldRef ID="261075db-0525-4fb8-a6ea-772014186599" Name="LayoutWebpartsContent" UpdateChildren="true" />
            <pnp:FieldRef ID="1a7348e7-1bb7-4a47-9790-088e7cb20b58" Name="_AuthorByline" UpdateChildren="true" />
            <pnp:FieldRef ID="d60d65ff-ff42-4044-a684-ac3f7a5e598c" Name="_TopicHeader" UpdateChildren="true" />
            <pnp:FieldRef ID="9de685c5-fdf5-4319-b987-3edf55efb36f" Name="_SPSitePageFlags" UpdateChildren="true" />
          </pnp:FieldRefs>
          <pnp:DocumentTemplate TargetName="/_layouts/15/CreateSitePage.aspx" />
</pnp:ContentType>

Whenever I create a new page out of this page template that’s connected to this content type, it gives me the reported error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:43 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
SaltySweatscommented, Dec 16, 2020

@brittanyru Thank you for posting this issue. Experiencing the same thing with our clients environments regarding our custom content types. Everything worked fine up until last Friday. Removing all of our custom fields from the CT and matching them 1 for 1 with site page, still gives us the same issue when creating a new page and saving: “Invalid data has been used to update the list item”.

1reaction
brittanyrucommented, Feb 5, 2021

sorry for the late update. it’s working fine now. thank you all!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid data has been used to update the list item. The field ...
1 Answer. Author is internal Sharepoint field which contains information about who created record (display name Created By ) and you cannot  ......
Read more >
2013 - "Invalid data has been used to update the list item. ...
I have created a custom content type based on the built-in "Event" content type. which have two columns "Start Time" and "End Time"...
Read more >
People picker Lookup "Invalid data has been used to update ...
People picker configured as cross-site lookup. Gets the following error "Invalid data has been used to update the list item. The field you...
Read more >
Transforming to modern site pages using PowerShell
Explains how to transform classic wiki and web part pages into modern pages using the SharePoint PowerShell.
Read more >
"Invalid data has been used to update the list ... - Quest Support
When trying to migrate documents, the following error is thrown (this prevents the Rich Text Body field from posting): Microsoft.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found