- last update
almost 2 years ago 39 pass - last update
over 1 year ago 39 pass - πΊπΈUnited States phubear
This is patch for FileFieldBuilder (pulled from https://www.drupal.org/project/diff/issues/3249765 β )
When doing (partial) D7->D8 migrations content nodes sometimes come across with bits temporarily missing. Like images.
The missing image may be the only thing wrong with the node.
When the Diff function is applied on revisions of a node with a "not-yet migrated image" a fatal exception is thrown:
The website encountered an unexpected error.
Error: Call to a member function getFilename() on null in Drupal\diff\Plugin\diff\Field\ImageFieldBuilder->build()
(line 38 of modules/contrib/diff/src/Plugin/diff/Field/ImageFieldBuilder.php).
The patch below implements two small defensive code snippets to get over the hump so that the content's revisions can still be compared (except for the missing image, of course).
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This is patch for FileFieldBuilder (pulled from https://www.drupal.org/project/diff/issues/3249765 β )