pnp / PnP

SharePoint / Office 365 Developer Patterns and Practices - Archived older solutions. Please see https://aka.ms/m365pnp for updated guidance
https://aka.ms/m365pnp
Other
1.9k stars 3.31k forks source link

_DisplayName field tag in List instances #1814

Open vipulkelkar opened 6 years ago

vipulkelkar commented 6 years ago

Category

[X ] Bug [ ] Enhancement

Environment

[ X] Office 365 / SharePoint Online [ ] SharePoint 2016 [ ] SharePoint 2013

Expected or Desired Behavior

Template should get extracted and applied without errors

Observed Behavior

File not found error

Steps to Reproduce

I am using the latest version of PnP version 3.1.1809.0 to extract a site template (PnP Powershell) from modern team site. While applying the template to another site (PnP Powershell and sites-core both), I get a File not found error.

On setting the trace log, I see the log file that the application fails at a step "Updating field 1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be"

In the template I see that a tag has been added for each list instance for the field "_DisplayName". On removing these tags, the template application works well.

I saw the templates extracted from earlier versions of PnP and I cannot see this tag. What is the purpose of this tag in the list instances ?

<pnp:Fields>
            <Field ID="{1a53ab5a-11f9-4b92-a377-8cfaaf6ba7be}" Name="_DisplayName" DisplaceOnUpgrade="TRUE" Sortable="FALSE" Filterable="FALSE" Hidden="FALSE" ReadOnly="TRUE" ShowInFileDlg="FALSE" Type="Lookup" DisplayName="Sensitivity" List="Docs" ListInternal="IpLabelCache" FieldRef="LabelId" ShowField="DisplayName" LeftList="Docs" LeftColumnName="IpLabelId" JoinColName="LabelId" JoinRowOrdinal="0" JoinType="LEFT OUTER" SchemaVersion="16.0.162.0" RecreateIfMissing="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="_DisplayName" FromBaseType="TRUE" />
</pnp:Fields>