CMB2 repopulating empty custom fields with WPML
-
I am currently using WPML to manage my translations, but I’ve noticed something fairly annoying with custom fields. Let’s say I have two languages and a custom text field called “meta-text”:
English (The original language)
French (The alternate language)I fill out my custom field in English, and then I publish a translation. Everything is dandy so far and works as it should; if “meta-text” isn’t filled in the translation, it takes the English value. The custom fields are also set to “Copy Once”.
The issue comes in when I attempt to empty out fields. If I go to the French post, and empty out “meta-text”, and try to update the post, it will simply save the text from the English post in its stead. However, if I update the custom field by myself in the WP Custom Fields panel and make the field empty, and press the “update” button in that panel, it updates fine, but as soon as I update the post itself, I run into the same problem; it copies the English text over.
However, if I try to change the field to anything that isn’t empty, it seems to work properly.
This is somewhat an issue with repeatable groups as there’s no way to remove all the groups if the original language has groups itself.
I’ve tried reaching out to WPML support, but all they’ve been doing so far is making me jump through hoops and try to sell me more plugins.
Is this a WPML problem or a CMB2 problem? I have trouble imagining how it would be the latter as everything else seems to work fine.
The topic ‘CMB2 repopulating empty custom fields with WPML’ is closed to new replies.