fix(core): make content taxonomy terms locale-aware in the editor#1224
Draft
scottbuscemi wants to merge 1 commit into
Draft
fix(core): make content taxonomy terms locale-aware in the editor#1224scottbuscemi wants to merge 1 commit into
scottbuscemi wants to merge 1 commit into
Conversation
Term assignments are stored against the per-locale content row while a term's translation_group spans every locale, so resolving terms for an entry must filter by the entry's locale. The terms endpoint now derives the entry locale server-side and passes it to getTermsForEntry, and the admin TaxonomySidebar threads the entry locale through its fetch/save calls and React Query keys. Previously a localized post showed and applied every locale variant of a tag. Closes #1218.
🦋 Changeset detectedLatest commit: 3e948e2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | 3e948e2 | May 29 2026, 10:20 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | 3e948e2 | May 29 2026, 10:22 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 3e948e2 | May 29 2026, 10:22 PM |
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/blocks
@emdash-cms/cloudflare
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
Contributor
PR template validation failedPlease fix the following issues by editing your PR description:
See CONTRIBUTING.md for the full contribution policy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1218.
Problem
Applying a localized tag to a post showed and applied every locale variant of the tag to each translation, rather than the variant for the entry's own locale (similar root cause to #1198).
Fix
The storage model is already correct (assignment stored against the per-locale content row; the term's
translation_groupspans locales). The bug was on the read side — the terms endpoint never passed a locale, sogetTermsForEntryreturned every variant./content/:collection/:id/terms/:taxonomynow derives the entry's locale server-side (not client-spoofable) and passes it togetTermsForEntryon both GET and POST-response reads.TaxonomySidebar/ContentEditorthread the entry locale through fetch/save calls and include it in the React Query keys so switching translations refetches.Testing
pnpm lint:quickclean;emdash+@emdash-cms/admintypecheck pass.packages/core/tests/integration/taxonomies/taxonomy-locale-terms.test.ts(describeEachDialect) — confirmed failing before the fix (route returned bothen+frvariants), passing after. SQLite ran locally (4 tests); Postgres runs in CI.Manual verification
Try this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
fix/1218-locale-aware-tags. Updated automatically when the playground redeploys.