PnP-Sites-Core icon indicating copy to clipboard operation
PnP-Sites-Core copied to clipboard

Lists not provisioned correctly - fields missing in list content type

Open r998877 opened this issue 7 years ago • 9 comments

Category

[x ] Bug [ ] Enhancement

Environment

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

If SharePoint on-premises, what's exact CU version: 15.0.4911.1000

OfficePnP Core version: 2.20.1711.0

Expected or Desired Behavior

Custom lists are provisioned correctly. Custom fields are added to the Item list content type.

Observed Behavior

Custom fields are missing in the Item list content type.

Steps to Reproduce

  • Create site collection A using team site template
  • Create custom list MyList
  • Create column MyField in list MyList
  • Create item. Verify that fields Title and MyField are shown in form
  • Get template from site using PnP code (Web.GetProvisioningTemplate())
  • Create site collection B using team site template
  • Apply previously extracted template by using PnP code (Web.ApplyProvisioningTemplate())
  • Navigate to list MyList in site B
  • Create item --> field MyField is missing in form
  • Navigate to list settings
  • Enable management of content types
  • Compare fields in list content type Item of list MyLIst in site collection B with content type Item in list MyList in site collection A. See the difference. In site collection B the item content type does not contain field MyField. See screenshots below:

Site A: image

Site B: image

r998877 avatar Nov 13 '17 20:11 r998877

Downgraded to SharePointPnPCore2013 version 2.18.1709.1 --> Works Bug exists since version 2.19.1710 (tested)

r998877 avatar Nov 14 '17 09:11 r998877

Also applies to SharePointPnPCore2016

RonWasabi avatar Nov 16 '17 00:11 RonWasabi

I experienced the same problem in SharePoint Online with SharePointPnPPowerShellOnline (2018-02)

NormanMann avatar Mar 07 '18 14:03 NormanMann

I have also experienced this issue with sharepoint online

loldot avatar Apr 04 '18 14:04 loldot

I have also experienced this issue. Any news?

efucaraccio avatar Apr 19 '18 16:04 efucaraccio

seeing same issue myself, when creating custom task list.

source site:

  1. Create custom task list from task list template from SP UI
  2. add column. column has Task CT in 'Used in'
  3. Add/Edit custom task list and column is visible
  4. Get-PnPProvisioningTemplate -Out "C:\temp\pnp\TargetBHGProjectSitetemplate.xml"

Target site:

  1. Apply-PnPProvisioningTemplate -Web $web -Path $path
  2. column does not have Task CT in 'Used in'
  3. Add/Edit custom task list and column is not visible

wgv-randerson avatar May 25 '18 17:05 wgv-randerson

Here the same issue !

  1. Create a Custom List with custom field in my "Site Template"
  2. Get-PnPProvisioningTemplate
  3. Apply-PnPProvisioningTemplate on an other site collection
  4. The columns exist but they are not attached/mapped to Item Content Type (Used in is empty)

Current workaround:

  1. Create custom site columns
  2. Create a custom content type with site columns
  3. Then, add the custom content type to the target list

Any new about this behavior?

Laul0 avatar Jan 16 '20 17:01 Laul0

Any updates on this issue? I am seeing it in SharePoint Online.

aniljbhatia avatar Oct 20 '20 18:10 aniljbhatia

I am facing the same issue. Any alternatives for SPO?

sandeepvootoori avatar Nov 16 '20 16:11 sandeepvootoori