Modernization: Error "creatingField" when transforming a publishing page with empty valued taxonomy field

Created on 24 Jan 2020  路  4Comments  路  Source: pnp/modernization

Category

[X] Bug
[ ] Enhancement

Problem Area

[ ] Page Transformation: Error during the setup/use of the Page Transformation UI solution (did you check our troubleshooting guide?)
[X] Page Transformation: Error during the use of page transformation from PnP PowerShell
[X] Page Transformation: Error during the use of page transformation from .Net
[ ] Page Transformation: Page is not looking correct after transformation
[ ] Modernization Scanner: something went wrong...

Expected or Desired Behavior

Add fix to handle empty value for taxonomy field of type "TaxonomyFieldType". (single-valued)

Observed Behavior

When adding a taxonomy field to be copied in the section, we're getting the error "creatingField" when the value is empty on the original publishing page
The same issue happens with both PnP PowerShell and .Net

Assembly version: 1.0.2001.0

Below is the error message and stacktrace

Error: [Summary] A critical error occurred - transformation did not complete Error: creatingField StackTrace: at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at Microsoft.SharePoint.Client.ClientRequest.<ExecuteQueryToServerAsync>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientRequest.<ExecuteQueryAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientRuntimeContext.<ExecuteQueryAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContext.<ExecuteQueryAsync>d__4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContextExtensions.<ExecuteQueryImplementation>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.SharePoint.Client.ClientContextExtensions.ExecuteQueryRetry(ClientRuntimeContext clientContext, Int32 retryCount, Int32 delay, String userAgent) at SharePointPnP.Modernization.Framework.Publishing.PublishingMetadataTransformator.Transform() in C:\Dev\GitHub\sp-dev-modernization\Tools\SharePoint.Modernization\SharePointPnP.Modernization.Framework\Publishing\PublishingMetadataTransformator.cs:line 217 at SharePointPnP.Modernization.Framework.Publishing.PublishingPageTransformator.Transform(PublishingPageTransformationInformation publishingPageTransformationInformation) in C:\Dev\GitHub\sp-dev-modernization\Tools\SharePoint.Modernization\SharePointPnP.Modernization.Framework\Publishing\PublishingPageTransformator.cs:line 510

Steps to Reproduce

  1. Create a publishing page with a taxonomy field and leave empty value for the field.
  2. Add the taxonomy field in the section of the publishing layout mapping file
  3. Transform the page
bug PageTransformationEngine Pending feedback

Most helpful comment

@schnito , @koenzomers : the fix for this issue has been committed to the dev branch. You can compile from the dev branch or use the February release, coming out on either Feb 14 or Feb 17.

All 4 comments

Thanks for reporting this issue @schnito , I can repro the problem and this indeed is a bug. The bug fix for this one will be part of the upcoming February release.

@schnito , @koenzomers : the fix for this issue has been committed to the dev branch. You can compile from the dev branch or use the February release, coming out on either Feb 14 or Feb 17.

Thanks for the quick fix Bert !

np, thank you for reporting the issue. I'll close this issue, feel free to create a new one in case you still experience issues after testing with the Feb release (which I do not expect as the fix was a simple one).

Was this page helpful?
0 / 5 - 0 ratings