- Issue created by @joel_osc
- Status changed to Needs review
about 2 years ago 6:58pm 1 May 2023 - 🇩🇪Germany mkalkbrenner 🇩🇪
Such a feature already exists using the
--skip_entity_type
option. - 🇨🇦Canada joel_osc
Hi and thank-you for your work on the module!!!
I think this patch is different than the --skip-entity-type option in that it is add the ability to skip referenced entities by type. Our business requirement is that no referenced nodes are exported. I think, but am not 100% sure, that if we use --skip_entity_type=node then we wouldn't get any nodes at all? Cheers!
- 🇩🇪Germany mkalkbrenner 🇩🇪
Can you post a concrete example? Then we could decide what to do.
- 🇨🇦Canada joel_osc
Okay, sounds great. An example would be if a user wants to export nid's 10,15,23 and all of the taxonomy references, media references with them but not the node references because they don't want any other local node updates exported other than 10,15,23. In this case you would want the ability to export nodes, but not any referenced nodes. Does this make sense?
- 🇩🇪Germany mkalkbrenner 🇩🇪
You could specify an entity type and the concrete entity IDs you want to export.
I would expect that --skip_entity_type=node should then only affect the node references. If not, that should be the small change.BTW we use "changes since". That would export a node you recently worked on and only references that have been changed as well.
- 🇨🇦Canada smulvih2 Canada 🍁
I looked into this in more detail. The
skip_entity_type
option is only available in Drush for export of entire site (drush dcdes
). If you pass node to this command (drush dcdes --skip_entity_type=node
) it will export all entity types except nodes. I think this is a good option to exclude things like url_alias entities from a full site export.The patch in #2 adds a UI to be able to exclude entity types as references. This only comes into play with
drush dcder
, or exporting with references through the UI. So I could do adrush dcder node
, and it will export all nodes with references, but will not include nodes as part of the references from nodes. This granularity is particularly important to have with batch API, since including nodes as references from nodes can lead to one batch operation including hundreds of nodes and timing out. I think now that #3349952 ✨ Include dependencies from processed text fields Fixed has been merged, this granularity becomes even more important, if using the "Export processed text dependencies" option.I think what is from patch #2 is the ability to pass this list of allowed reference types to Drush, as I know @mkalkbrenner requested this for another one of my patches. This would allow Drush to override what's in the UI if needed, so provides more flexibility.
- Status changed to Fixed
10 months ago 10:37am 12 July 2024 - 🇩🇪Germany mkalkbrenner 🇩🇪
I went ahead and made the existing option skip_entity_type available to all imports. Because you added your setting form to ✨ Use Batch API for export/import Needs review I re-used it to configure the entity types to skip.
Like any other parameter, you could overwrite the setting by providing the dedicated parameter.I prefer to keep the existing negative list and to use it everywhere instead of introducing an additional positive list. The advantage is that a new content type gets exported by default using this approach.
Automatically closed - issue fixed for 2 weeks with no activity.