Added logging and try/catch around retrieval of references, so we don't block critical operations following an incompatible data type change #18576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites
Resolves issues #17725 and #17628
Description
Both issues linked look to stem from a change of a data type's property editor to something incompatible. When you do that, and the CMS attempts to retrieve references, it throws an exception. The exception is expected, but given references aren't a critical feature, we should log and move on, so as not to prevent more important actions like saving, publishing and deleting the content item.
So this PR is just a try/catch/log and move on.
To Test - see "Steps to reproduce" on #17725