Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When translating a node using entity translation, the conditional fields do not work. All dependents are shown, regardless of the value of the dependee. Changing the dependee does not update the dependents.
It works fine when creating a new node, but not when creating a new translation of that node.
After translating a node, editing the translated node works as expected.
Comment | File | Size | Author |
---|---|---|---|
#2 | conditional_fields-entity-translation-support-2125191-2.patch | 627 bytes | rafenden |
Comments
Comment #1
rafenden CreditAttribution: rafenden commentedI've installed instance of conditional_fields module at simpletest.me with following configuration:
Enabled modules:
entity_translation (7.x-1.0-beta3)
conditional_fields (7.x-3.0-alpha1)
Tags visible when "Body" field is filled
jamieus, probably you have installed some additional modules that breaks conditional_fields functionality.
Comment #2
rafenden CreditAttribution: rafenden commentedI know what's the problem.
If you're adding translation with entity_translation module some fields in $form array contain different values.
When editing node:
http://take.ms/9YK87
When adding translation:
http://take.ms/NnjiN
The most important difference with those two forms is #field_name key which exists only when adding translation.
Because of that conditional_fields module is using wrong field when adding information about dependencies, see conditional_fields.module:222
Comment #3
ryanoreilly CreditAttribution: ryanoreilly commentedConfirming patch in #2 fixes same problem for me.
Comment #4
Tyler the Creator CreditAttribution: Tyler the Creator commented#2 works for me as well.
Comment #5
natew CreditAttribution: natew commentedThanks for the patch, #2 worked for me.
Comment #6
al.ex CreditAttribution: al.ex commented+1 for patch #2.
Comment #8
peterpoe CreditAttribution: peterpoe as a volunteer commentedThanks!
Comment #10
steva1982 CreditAttribution: steva1982 commentedIs it possible to commit it in 7.x-3.0-alpha2 version?
Thanks