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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

basby created an issue. See original summary.

fidovdbos’s picture

@basby is wil take a look to fix this issue thnx for reporting.

harry_nc’s picture

I 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

Andy_D’s picture

Priority: Normal » Critical

Confirmed 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...

nwoodland’s picture

Status: Active » Needs review
FileSize
16.48 KB

Hi 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!

dmouse’s picture

FileSize
16.52 KB

I added a verification to check if the `$target_term_entity` exist

Nigel Cunningham’s picture

The 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).

fidovdbos’s picture

I have test the patch and it works correct. you need to run een config export to make it work.

  • dmouse authored 2cc075f on 8.x-1.x
    Issue #2961392 by dmouse, nwoodland: Taxonomy with custom fields not...
Arbalest89’s picture

I have test the patch and it works correct. you need to run een config export to make it work.

What 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.

komlenic’s picture

FYI "een" is Dutch for "a". So I believe the statement is "You need to run a config export to make it work."

colan’s picture

Status: Needs review » Fixed

So this is fixed then as per #9?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.