This problem is the same as in #2501751: Visibility rules aren't saved for unlimited multiple value fields.
When visibility rules for panes are edited, they are not saved in some cases. Please see the full description in the issue mentioned above.

Comments

maximpodorov’s picture

Status: Active » Needs review
StatusFileSize
new638 bytes

The patch fixes the problem in the same manner as in the CTools' issue.

maximpodorov’s picture

osopolar’s picture

Thanks maximpodorov, this works for me.

crmn’s picture

patch #1 works for me

ian_v’s picture

Thanks, patch #1 works for me.

damienmckenna’s picture

This seems to be a safe bet.

damienmckenna’s picture

dsnopek’s picture

Moving to 3.8 so we can get 3.7 out quicker!

osopolar’s picture

philsward’s picture

Status: Needs review » Reviewed & tested by the community

This yet again, fixed an issue with an empty "entityreference" field that failed to save the "NOT" declaration. I'm not 100% sure if this fixes issues with the "multivalue" fields, however, this patch in combination with #2501751: Visibility rules aren't saved for unlimited multiple value fields DOES fix the problem described in #2503509: Make Visibility Rules Validate Against Null Field Values . I will note that my entityreference field IS a multivalue field though...

In my case, I was trying to validate a NOT against an empty (null) entity reference field. In other words, if it's empty, do not show it.

After applying both patchs:
#2504465: Visibility rules aren't saved for unlimited multiple value fields & #2501751: Visibility rules aren't saved for unlimited multiple value fields
my issue (being able to save it as "NOT" against a null entity reference field) is resolved..

Moving to RTBC, if for anything to get the functionality included that will recognize and save against the empty / null values.

At the very least, we NEED the patch from #1 included in order to fix the issue described in #1188466: Add a simple selection rule for checking if a field is empty. So, this patch will allow you to save the visibility rules, however it won't perform the desired selection. You need the other patch (1188466 #42) in order for the visibility rule to work against an empty value.

If the 'multivalue' issue still isn't resolved, I suggest that we rename this issue to denote it as a fix for the empty/null problem and create a new issue that solely targets saving visibility rules on multivalue fields.

anybody’s picture

I can confirm this is still needed and works. Confirming the 2 years old RTBC.

joseph.olstad’s picture

retriggered tests

izmeez’s picture

1+ RTBC hoping for commit.

joelpittet’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @maximpodorov, I've committed this for the next release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.