The following dependency is given:
field_foo_bar field_bar field_foo_bar is invisible when field_bar has value "7".

The problem is at when displaying the node, the foo_bar field is not shown (the field_bar is not 7 surely).
It seems that in conditional_fields_entity_view_alter(), it does not care about negated conditions.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Aron Novak’s picture

peterpoe’s picture

Title: Negated conditions are evaluated incorrently in conditional_fields_entity_view_alter(). » Dependency description is confusing about actual effect
Status: Needs review » Active

When displaying the entity, if the "Hide the dependent if the dependency is not triggered" option is active, we evaluate if the condition was triggered. So, if field_bar has value 7, the dependency is triggered. Conversely, if field_bar has value != 7, field_bar is hidden.
This happens independently from the "Form state" option.

The problem here is that the description of the dependency is confusing on this matter, so I'm changing the title of the issue.

And yes, it would be nice to have many more "Entity view" options on triggered conditions. Marking it as "TODO" :)

Anonymous’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
3.26 KB

We were facing the same issue. The description in case of entity reference and term reference had the term id/entity id instead of term name/entity title. Providing a patch to show term name/entity title

karsumit94’s picture

Reviewed and tested. The patch by @monojit256 fixed the issue.

shayoni92’s picture

This patch works for me.

dqd’s picture

Status: Needs review » Closed (outdated)

Many things have changed already in newer versions on this regard. Apart from that:

Thanks for the report and all the efforts in here. But due to inactivity in this issue for some years and because of the upcoming EOL of Drupal 7, I will close this issue on the way by cleaning up the issue queue.

Feel free to re-open as "Needs review" if you found a solution or have a patch to be reported to help others on this outdated version.

If you think this issue or missing feature should be addressed in a newer Drupal core 8 and above compatible version of this project, then please file a new issue to the latest dev.