- Issue created by @svendecabooter
- Merge request !60Add support for custom_field, by replacing referenced entity IDs with referenced entity UUIDs β (Open) created by svendecabooter
- π§πͺBelgium svendecabooter Gent
Created an MR that updates custom_field data in the Default Content export for referenced entities.
Original output without this MR:
field_my_custom_field: - label: 'Exported label' image: 21 # Some random file ID image__width: 1024 image__height: 1024 image__alt: Sunset image__title: '' file: 22 # Some random file ID term: 4 # Some random taxonomy term ID
After applying this MR. this becomes:
field_my_custom_field: - label: 'Exported label' image: aa6340f0-0006-4f31-9f2d-5595f5cce028 image__width: 1024 image__height: 1024 image__alt: Sunset image__title: '' file: c36ea199-cd17-4fe5-bec7-beef1ffb51b4 term: 78ae1ee7-f2d4-4fc0-871e-1af92730df3b
The referenced UUIDs also get added as a dependency to the "_meta" definition.
- π§πͺBelgium svendecabooter Gent
On the import side of things, there is a patch for custom_field that makes this work: π Support Drupal core DefaultContent API Active .
- π§πͺBelgium svendecabooter Gent
Attached is a patch file for the current state of the MR, useful for Composer based patching workflows.
- πΊπΈUnited States apmsooner
@svendecabooter,
Building on my comment in https://www.drupal.org/project/custom_field/issues/3528586#comment-16166705 π Support Drupal core DefaultContent API Active , it might just make best sense to create a reference type base class in custom_field that those 3 types extend so that this patch here can just depend on a single class. Forward thinking here in case we were to add new similar data types in custom_field so we don't have to go back and request a change again here.
- πΊπΈUnited States apmsooner
This patch would put a dependency on custom_field module. Needs to just check for the class as string vs. requiring the interface.