Automattic / Automattic/babble

Filtering `bbl_translated_meta_fields` doesn't stop `meta_keys` from syncing

Open
#260 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
PHP
Stars
250
Forks
44
PR merge metrics
No merged PRs in 30d

Description

1. Specify some fields for translation, as per https://github.com/Automattic/babble/blob/master/translation-fields.php
2. Create a post and trigger translations
3. Complete the translations
4. Update the original post

The translated fields will be overwritten by the values specified in the post in the canonical language.

Two possible solutions:
1. The developer should both filter `bbl_translated_meta_fields` to specify the translation config for each field AND filter `bbl_sync_meta_key` to stop those keys being filtered
2. Babble should stop a `meta_key` which has a translation config (e.g. in `bbl_translated_meta_fields`) from syncing

Contributor guide

Open the contributing guide

Research direction

Start with translation-fields.php and trace how bbl_translated_meta_fields and bbl_sync_meta_key are applied during post updates. Reproduce the listed translation and update sequence, then inspect existing tests or sync entry points to determine the expected behavior for meta keys with translation configuration. Done means translated meta values are not unexpectedly overwritten after updating the canonical post.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, internationalization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.