Babel: TVs are not being synced between languages

I am trying to synchronize template variables between different languages/contexts, but I’ve had no luck trying to get this to work so far.

I have entered the TV’s ID in the babel.syncTvs system setting and linked two resources with “Copy synchronized TVs to target” enabled, but when I change the TV’s value in one resource, the value in the linked resource is not updated.

There’s no relevant errors showing up in the log as far as I can tell. For testing purposes, I have written a plugin which should write a message to the log when OnBabelTVSynced is invoked, but there is nothing showing up (if I change the plugin to be triggered by OnBabelLink instead for example, the message does show up).

MODX version is 3.0.4-pl, Babel version is 3.3.2-pl.

I believe the problem is here in the code:

The code adds the namespace (= babel) to the parameter in the call to “getExplodeSeparatedOption”. Then later the namespace gets added ones again (meaning the code looks up the system setting babel.babel.syncTvs instead of babel.syncTvs):

So try changing line 154 to this instead:

'syncTvs' => $this->getExplodeSeparatedOption('syncTvs', [], ''),

Yes, that seems to have solved the issue! Thank you for your help :slight_smile:

Babel 3.3.3 is available.

1 Like