pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
416 stars 643 forks source link

External content types cause Get-PnPProvisioningTemplate critical failure #1110

Open Pieter-Veenstra opened 7 years ago

Pieter-Veenstra commented 7 years ago

Category

[X ] Bug [ ] Enhancement

Environment

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

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

Expected or Desired Behavior

External content types and lists are currently not handled by the PnP templates. Long term goal: make this work.

Short term goal: ignore external content types during the export.

Observed Behavior

External content types and lists are currently not handled by the PnP templates. External content types created at the site collection level cause an export of a site to fall over and makes it impossible to export the site.

Get-PnPProvisioningTemplate : Entity (External Content Type) cannot be found with Namespace = 'https://portal.customer.com', Name = 'Project'.
At C:\temp\PVPnP\CollectUpdates.ps1:87 char:11
+                    Get-PnPProvisioningTemplate -Web $web -Out "$path\Templates\$template\ ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (:) [Get-PnPProvisioningTemplate], ServerException
    + FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.GetProvisioningTemplate

Steps to Reproduce

Create external content type at the site collection level and export the site.

jansenbe commented 7 years ago

Indeed is a bug which should get fixed. Thanks for reporting this.

Pieter-Veenstra commented 7 years ago

@jansenbe , should we include a quick fix in the March release, simply to ignore external content types?