This module doesn't give parent node of reference fields from
https://www.drupal.org/project/paragraphs
There are nested or recursive entities, that allow multiple levels of referenced entities in a field.
I checked that DependencyFieldMapGenerator service and return parent entities, but for Paragraph it will useful have parent node instead.
We could check if entity given is a paragraph and find parent node. I think to create a sub module for paragraphs that manage that.
entity_reference_integrity_paragraphs
Also create in root module an event, subscriber and dispatcher only for projects that have that sub module installed.
Comments
Comment #2
cgomezgComment #3
cgomezgAdded an Event and Dispatcher
Added sub module
entity_reference_integrity_paragraphswith Event SubscriberComment #4
cgomezgHere patch with sub module
Comment #5
cgomezgComment #6
renrhafModifying the patch to avoid loosing references when paragraphs are present.
Thus, we can consider other entity types than Nodes for the parent host entity.
The problem is that this patch is coupled with https://www.drupal.org/project/entity_reference_integrity/issues/3106920...
Comment #7
renrhafOops forgot the Events code
Comment #9
renrhafUploading also the patch for both issues : this one and the links https://www.drupal.org/project/entity_reference_integrity/issues/3106920
for people who needs it.
Comment #10
renrhafChanging the patch because parent entities using paragraphs are still showing up in the dependencies, even if the paragraph reference was removed from the parent entity. This has to deal with https://www.drupal.org/project/paragraphs/issues/2920545
Comment #11
mrshowermanAdding support for D9.
Comment #12
mrshowermanRe-roll against current dev.
Comment #14
mrshowermanComment #15
ghost of drupal pastRelated: Smartsheet has code which adds the root parent entity to paragraphs. We are interested in open sourcing this but would like co-maintainers. https://gist.github.com/chx/81a2bc111570e4476861b2d4124fa8c8 is it, needs to be turned into a separate module, some queries in the update are MySQL specific right now, the root link views plugin is crude and there's no tests.
Email karoly.negyesi@smartsheet.com if interested.