Needs review
Project:
Content Synchronization
Version:
4.0.x-dev
Component:
Snapshot
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Jun 2018 at 11:43 UTC
Updated:
25 Sep 2024 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kfritscheHere a patch for this.
Comment #3
kfritscheChanged to config as it works better than the hook implementation and if you add the config to your profile its also active on install already.
Comment #4
steveoriolhello kfritsche,
I try to use your patch by changing the module config for:
but I get errors when I export the content...

if I use:
I have no error, but all the entity type.
Comment #5
kfritscheRe-roll after latest patches got applied and fixing the reported issue by steveoriol.
Comment #6
kfritscheRe-roll of #5.
Comment #7
grougy commentedHello kfritsche,
Your idea is very usefull,
There is then a bug in ImportQueueResolver :
When an entity is in the whitelist but none of its dependencies, the entity is then wiped from the import queue (because never added to the Graph)
When the entity has no dependency at all it is working fine.
We should test in the loop if at least one dependency is added to the Graph, if not the parent entity needs to be added like if no dependency.
Greg
PS : would it be hard to go further and handle entity bundle in the white list ?
Comment #8
webfaqtory commentedMaybe I'm misunderstanding the purpose of this patch but I only want to sync nodes where the content has changed (or even all nodes). I applied the patch with the following config:
The export worked fine and only contained nodes. However the Synchronize page indicated that it was going to remove all content that was not a node. Is there a way for the remove to only apply to the entity_types in the config?
Comment #9
blanca.esqueda commentedHi,
@webfaqtory and @grougy,
You can find functionality that handles partial import/exports in:
https://www.drupal.org/project/content_sync/issues/2873074#comment-13019230
It can handle partial import/exports filtered by entity types, bundles, uuids and actions.
Because of partial imports, some work on the ImportQueueResolver was done:
Now, if an entity has dependencies and it is not included in the content to import then it checks that it exists in the active storage (site DB). if dependencies are not in the active storage then try to pull it from the content sync directory.
Only when dependencies can't be found anywhere the entity import is skipped.
Because of partial exports, an ExportQueueResolver was added to provide the option to export including dependencies.
The new functionality for partial import/exports is handled by Drush commands, but the options will be added to the UI asap.
Comment #10
grougy commented@Blanca.Esqueda
OK thanks for pointing me to the issue. I'll have a look.
Comment #11
kfritscheRe-roll after latest changes.
Comment #12
kfritscheFixing a warning noticed through our internal testing system.
Comment #13
kfritschesmall fix when you have computed values.
Comment #14
kfritscheLast fix still had an issue with computed values. This should be hopefully fixed now.
Comment #15
chegor commented#14 works for me.
Comment #16
skaughtfixes admin settings form to add checkboxes selection of entities to export.
Comment #17
skaughtsorry, left a ddl() in #16.
Comment #18
blanca.esqueda commented