When exporting taxonomy terms using Structure Sync, the status field (published/unpublished) is not included in the exported data. As a result, when terms are imported into another environment, all terms are created as published regardless of their actual status in the source environment.
This means unpublished taxonomy terms become published after a structure sync, which is a silent data loss issue that can affect content visibility.
Proposed resolution
Include the status field when exporting taxonomy terms, and apply it when creating or updating terms during import. If the status field is absent in stored data (e.g. for backwards compatibility), default to published (1).
The attached patch modifies src/Controller/TaxonomiesController.php to:
- Export the status value alongside other term fields
- Include status in the term data array during import (defaulting to 1 if not present)
- Call $term->setPublished() or $term->setUnpublished() accordingly when updating existing terms
| Comment | File | Size | Author |
|---|---|---|---|
| structure-sync-taxonomy-status.patch | 1.63 KB | lucas toneatto |
Comments
Comment #2
avpaderno