content_taxonomies links content and terms with inconsistent locale semantics (term side locale-agnostic, entry side per-locale → tag drift across translations) #1768
khoinguyenpham04
announced in
Roadmap
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This Roadmap discussion mirrors #1348: content_taxonomies links content and terms with inconsistent locale semantics (term side locale-agnostic, entry side per-locale → tag drift across translations).
Use this discussion to upvote the roadmap item and discuss priority, use cases, and product feedback. Keep implementation tracking, reproduction details, and PR-specific feedback on the source issue.
triage/reproducedOriginal Issue
Description
content_taxonomieslinks the two ends of a content↔term assignment with inconsistent locale semantics, and the asymmetry causes per-locale tag drift.The junction row is
(collection, entry_id, taxonomy_id):taxonomy_idis locale-agnostic. Since migration036_i18n_menus_and_taxonomies, it stores the term'stranslation_group(not ataxonomiesrow id). The old FK was deliberately dropped so one junction row covers every locale translation of the term. Reads confirm it —TaxonomyRepositoryjoinstaxonomies.translation_group = content_taxonomies.taxonomy_id.entry_idis per-locale. It stores a single content row's id. Because content tables are row-per-locale (migration019_i18n), each translation of a post is a distinct row with its own id, so a junction row attaches a term to one locale's entry only, not to the contenttranslation_group.So a
content_taxonomiesrow links one locale's entry to a locale-collapsed term concept. The two ends disagree on what "the same thing across locales" means.Why this is a bug (observable consequence): term assignments are only synced across content translations once, at creation time, via
TaxonomyRepository.copyEntryTerms("Used when creating a translation of a post so the new translation inherits the source's term assignments"). It's a one-time snapshot. After that the locale entries drift:News. Create its Arabic translation → it inheritsNews(copy at creation). Good so far.Sports. The Arabic translation does not receiveSports— itsentry_iddiffers and nothing re-syncs.The result is that "the same content in another language" can carry a divergent set of terms with no UI/runtime affordance reconciling them, even though the term side was specifically designed to be locale-agnostic. Either both ends should be group-keyed (assignments shared across the content translation_group), or the divergence should be an explicit, surfaced feature rather than silent drift from a creation-time copy.
This is a design/consistency bug rather than data loss — flagging for a decision on intended semantics.
Steps to reproduce
ar) and create apostscollection with a taxonomy (e.g.Category).News.NewsviacopyEntryTerms).Sportsand save.getTermsForEntry(collection, arEntryId)).News;Sportsnever propagated.Expected (or to be decided): assignments stay consistent across translations of the same content, mirroring the locale-agnostic term side — or per-locale divergence is an explicit, documented capability.
Environment
packages/core)packages/core/src/database/migrations/036_i18n_menus_and_taxonomies.ts(taxonomy_id→translation_group)packages/core/src/database/repositories/taxonomy.ts(getTermsForEntry,setTermsForEntry,copyEntryTerms)packages/core/src/database/migrations/019_i18n.ts(row-per-locale content)Logs / error output
N/A — behavioral/design inconsistency, no error thrown.
All reactions