PnP-Sites-Core
PnP-Sites-Core copied to clipboard
Lists not provisioned correctly - fields missing in list content type
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:
Site B:
Downgraded to SharePointPnPCore2013 version 2.18.1709.1 --> Works Bug exists since version 2.19.1710 (tested)
Also applies to SharePointPnPCore2016
I experienced the same problem in SharePoint Online with SharePointPnPPowerShellOnline (2018-02)
I have also experienced this issue with sharepoint online
I have also experienced this issue. Any news?
seeing same issue myself, when creating custom task list.
source site:
- Create custom task list from task list template from SP UI
- add column. column has Task CT in 'Used in'
- Add/Edit custom task list and column is visible
- Get-PnPProvisioningTemplate -Out "C:\temp\pnp\TargetBHGProjectSitetemplate.xml"
Target site:
- Apply-PnPProvisioningTemplate -Web $web -Path $path
- column does not have Task CT in 'Used in'
- Add/Edit custom task list and column is not visible
Here the same issue !
- Create a Custom List with custom field in my "Site Template"
-
Get-PnPProvisioningTemplate
-
Apply-PnPProvisioningTemplate
on an other site collection - The columns exist but they are not attached/mapped to
Item
Content Type (Used in
is empty)
Current workaround:
- Create custom site columns
- Create a custom content type with site columns
- Then, add the custom content type to the target list
Any new about this behavior?
Any updates on this issue? I am seeing it in SharePoint Online.
I am facing the same issue. Any alternatives for SPO?