Problem/Motivation

This is this dependency chain:

media entity -> node entity -> path_alias entity

If the media entity got deleted before node entity or path_alias entity being imported on the subscriber side, the importing would fail because of the below error:

[error] Import failed: Did not retrieve all requested entities. 3 of 4 retrieved. Missing entities:

To node entity, this is understandable, because the deleted media entity is indeed a dependency.

But for path_alias entity, it does not make sense to declare the deleted media entity a dependency, as long as the node entity is a dependency, the node will make sure its dependent media entity get imported as well.

Proposed resolution

1. Do not include dependency recursively
2. Need a way to update/re-export the parent entity if a child/dependent entity changes

CommentFileSizeAuthor
#5 3188123-CH-dependency-fix.patch1.11 KBguaneagler
Command icon 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

weynhamz created an issue. See original summary.

weynhamz’s picture

Issue summary: View changes

weynhamz’s picture

The fix in this MR depends on the depcalc module issue https://www.drupal.org/project/depcalc/issues/3188124

With this change, the CDF Object published to Content Hub will not have recursive dependencies included so that it is easier to use `AUTO_UPDATE_DISABLED` to just disable importing an entity along with its dependencies, e.g. modules do not want to be installed, on the subscriber side.

guaneagler’s picture

StatusFileSize
new1.11 KB

I have uploaded the latest patch mapping to CH module with version 3.2.

The problem I met is that without this patch, I need to export one entity with multiple times as it takes more than 1 hour and drush execution stops.
And then I add this patch, I can finish the entity export in a short time, and only need to export one time.

This patch need to work with the path in this issue https://www.drupal.org/project/depcalc/issues/3188124

Status: Needs review » Needs work

The last submitted patch, 5: 3188123-CH-dependency-fix.patch, failed testing. View results