ACF 'empty' conditions not evaluating properly

I noticed that one of my page elements disappeared after a recent update.

If the condition is set to “not empty”, the element doesn’t show - even the ACF field has a value.

If I change it to show when empty (even though it’s not), then the element appears.

So it looks like empty vs not empty might be reversed now.

P.S. it’s the same element as referenced in "Query content not found" in backend when using Include Posts - #4 by sunny - in case you need more context.

Hello @sunny,

Thanks for the report.

Indeed, our new assessment of ACF values isn’t applying to Relationships (which I believe is the type of the Tools Used field).

We’ll have this fixed in the next update.

Apologies for the inconvenience.

Cheers,

1 Like

Yeah, it’s a Relationship field. Thanks again!

Hi @sunny,

This should be addressed in 1.2.9.5.8.
If you still experience trouble with it, I’d be grateful if you could let me know by replying to this thread.

Thanks for the report.

Cheers,

Hey @Louis, this one actually didn’t get resolved for me.

It still only shows up if the condition is set to ‘empty’. I tried removing and re-adding the condition as well.

Here the same ‘issue’ with the empty / not empty conditions with the visability of a gallery.

Hello @sunny,

Sorry to hear that.
Might I be missing something? Thanks.

Frontend: Query Relations – cwiclydemo

Backend: https://app.instawp.io/wordpress-auto-login?site=$2y$10$EljiYPdiD8XENMAEmwVCG.W92XFZ9nr2dRr..lXNMTCKaVaNCmDhm

1 Like

Hello @dennis77,

Thanks for the report.
Indeed, the Gallery empty/not empty conditions are not correctly evaluated.

My apologies for this. We’ll have this fixed in the next update.

This is strange - so far I can’t easily reproduce.

@Louis Ready for this?

Was playing around on my staging site. If I duplicate the ACF relationship field, delete the original, and change the field name of the new one to match the original - the condition evaluates properly again :no_mouth:.

Let me know if this is at all useful before I just do it on my live site as well.

Hey @sunny,

That sounds rather odd!
We don’t target the ACF field name but literally its key, which I think is unique.

Did you have to re-apply the ACF field in the conditions?

I know right? I’m not sure why the original field was evaluating the opposite.

Nope, but the condition was already targeting the duplicate field, since I had tested it before deleting the original (which is inline with what you’re saying).