Skip to content

Conversation

AndyButland
Copy link
Contributor

Forward port of #20079 for Umbraco 16.

See linked PR for details.

@Copilot Copilot AI review requested due to automatic review settings September 16, 2025 10:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR forward ports a fix from Umbraco 15 to prevent exceptions when retrieving references during content migration with changed data types. The changes focus on improving error handling in block editors by adding logging capabilities and avoiding fatal exceptions when deserializing invalid block data.

  • Adds logger parameter to block editor constructors to enable proper error logging
  • Replaces exception-throwing deserialization with safe parsing that logs warnings
  • Improves resilience during content migration scenarios where data format mismatches occur

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
BlockEditorPropertyValueEditor.cs Main implementation with new constructor overload, logger field, and safe parsing method with warning logs
BlockListPropertyEditorBase.cs Updates constructor call to pass logger parameter to base class
BlockGridPropertyEditorBase.cs Updates constructor call to pass logger parameter to base class

Copy link
Contributor

@kjac kjac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AndyButland I reintroduced the generic catch to avoid a potential functional breaking change here. Other than that it looks good 👍

I'll leave it up to you to merge, in case you have any objections with my change 😄

@AndyButland AndyButland enabled auto-merge (squash) September 16, 2025 11:19
@AndyButland AndyButland merged commit 8cc1d4b into main Sep 16, 2025
25 checks passed
@AndyButland AndyButland deleted the v16/bugfix/avoid-exception-on-get-references-after-migration branch September 16, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants