Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
We have a vocabulary with two custom fields and about 100 terms. When I select the vocabulary for export, the values for the custom fields are not exported. This seems to be a bug to me. Or am I missing anything?
Comment | File | Size | Author |
---|---|---|---|
#6 | 2961392-6.patch | 16.52 KB | dmouse |
#5 | structure_sync-support-for-custom-taxonomy-fields-2961392-5-D8.patch | 16.48 KB | nwoodland |
Comments
Comment #2
fidovdbos CreditAttribution: fidovdbos commented@basby is wil take a look to fix this issue thnx for reporting.
Comment #3
harry_nc CreditAttribution: harry_nc commentedI think this is happening on custom block types too. I've got a 2 block types, 1 vanilla and 1 with a custom field in (in entity ref to a custom entity type). The vanilla block is syncing perfectly, but the other is not retaining any custom field info.
Great module otherwise!
Cheers
Harry
Comment #4
Andy_D CreditAttribution: Andy_D commentedConfirmed this is not working for us too. A show stopper.
I suspect because of this https://cgit.drupalcode.org/structure_sync/tree/src/Controller/Taxonomie...
Comment #5
nwoodland CreditAttribution: nwoodland commentedHi all,
My company had a need for syncing taxonomies with custom fields between systems, so I've created the attached patch to add support for this.
We also had the more fringe requirement of supporting term reference fields on taxonomy terms (terms linked to other terms), and because we couldn't simply pass the TID values along during the import process because the syncing process doesn't keep TIDs in sync, this patch exports term ref field values as VID / term name pairs and performs a lookup on that pair during the import process (it also calls the import recursively in cases where a lookup is performed but the term that's being looked-up hadn't been created yet).
Hope this is helpful to others!
Comment #6
dmouseI added a verification to check if the `$target_term_entity` exist
Comment #7
Nigel CunninghamThe patch successfully exported taxonomy fields for me but only after I'd deleted the previous structure_sync.data.yml. (That is, whatever it is that detects whether info has changed failed to notice that additional data would be exported with the patch applied).
Comment #8
fidovdbos CreditAttribution: fidovdbos commentedI have test the patch and it works correct. you need to run een config export to make it work.
Comment #10
Arbalest89 CreditAttribution: Arbalest89 commentedWhat do you mean with "een conf export"? I've tested the patch but it doesn't seems to work. Only the hierarchical structure is imported but not its custom fields.
Comment #11
komlenic CreditAttribution: komlenic commentedFYI "een" is Dutch for "a". So I believe the statement is "You need to run a config export to make it work."
Comment #12
colanSo this is fixed then as per #9?