Hi,

On one of my projects I had problems with synching taxonomy values via i18nsync module. As it turns out this is because Taxonomy defaults module is enabled. I've played with different settings. The taxonomy that wasn't synching did not have a default set for the node type, but it wouldn't sync. I disabled the default term for the other taxonomies on this node type, but it wouldn't sync. Then i disabled the taxonomy defaults module and it synched fine.

I think somehow the taxonomy defaults module needs to respect if there is a $form['#node']->translation_source->taxonomy and then not apply a default for that taxonomy just like it doesn't apply a default term for nodes that already have non default terms.

On lines # 96 and #112 I've changed

if (!isset($node->nid)) {

to

if (!isset($node->nid) && !$form['#node']->translation_source->taxonomy) {

This seems to do the job. Can't create a patch from this machine but if the fix above is something that will be committed I'll create one asap.

Cheers

CommentFileSizeAuthor
#1 i18nsync.compatibility.patch1.15 KBbartezz

Comments

bartezz’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

Cooked up a better patch.

This not only checkes if there is a node translation source but also if the taxonomy is marked for synchronizing.

With this patch taxonomy defaults only does it's thing for:
- new nodes: !isset($node->nid)
- new node translations that are not supposed to synchronize taxonomy: !$form['#node']->translation_source->taxonomy && in_array('taxonomy', (array)$i18nsync_fields)

Cheers