Problem/Motivation
I ran into an issue while using conflict_paragraphs in conjunction with a patch from #2427803: [PP-1] Expose target type, selection handler and selection settings in LinkWidget, which adds a "target_type" setting to the link field type. This target type may be an empty string.
\Drupal\conflict_paragraphs\ConflictResolution\MergeRemoteStructure::resolveConflictsContentEntity calls ParagraphsWidget::isApplicable(), even when $field_definition is not of the type "entity_reference_revisions" type. So when target_type is empty, a \Drupal\Component\Plugin\Exception\PluginNotFoundException is raised, saying "The "" entity type does not exist."
Proposed resolution
Turn this :
if (ParagraphsWidget::isApplicable($field_definition))
Into this :
if ($field_definition->getType() === 'entity_reference_revisions' && ParagraphsWidget::isApplicable($field_definition))
Issue fork conflict-3507679
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments