When I’m using an Image field inside of a Repeater that’s inside a Flexible Content layout, the return values are coming back incorrectly. I haven’t thoroughly tested to see if it’s working correctly in other scenarios.
When I select Array, it returns the ID. When I select URL, it returns the Array. And when I select ID, it returns the URL. For now I’m just relying on the choosing the radio button that gives me the value I need, but it’s not the one I’ve selected.
As far as I know, only if you’re using something like switch_to_blog and the blog you’re switching somehow has a different return format set for the field. Even here, I’m not sure. If for example the first time ACF loads the field with that field name/key. Whatever return value is loaded then is what will be used since it will be cached so that ACF does not query the DB again. Outside of this there would need to be some filter that’s altering the return value setting for the field.
Viewing 4 posts - 1 through 4 (of 4 total)
The topic ‘Image field returns incorrect value type’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users