Home › Forums › Front-end Issues › Page_Link field no longer returning UR
Hello,
I recently updated to the most recent version of ACF, and now a Page Link field is only returning an ID when it should be returning a URL. The same thing is happening for a File field, which should be returning the file URL, but is instead returning the ID.
Is anyone else experiencing this? I really need to figure out how to fix this fast!!!
Thank you,
Melissa
Hi,
I have the same issue with a file field. I just recently started using ACF. I am running ACF PRO, v5.7.9 on WP 5.0.2 with ClassicEditor plugin 1.3 (in case that matters).
I found (sort of) a description of this problem in an old forum post, but I am not sure the problem should be there in the first place, since I didn’t code anything myself. More precisely, the older post describes misplacements of function calls, but I am using everything “out of the box”, not self-coded add-ons, child-themes or the like. Here is what I found earlier:
On
https://support.advancedcustomfields.com/forums/topic/image-file-type-return-value-not-working/
“dotancohen” wrote on March 16, 2016 (he is talking about an image field, but the same applies to the file field, I guess):
When using
get_field()
orthe_field()
and the Image ID is returned instead of the expected return value, this is a sign thatacf_add_local_field_group()
was not run. Therefore ACF is pulling the raw value from the database but has no way to determine in which format you want it.To resolve the issue, ensure that
acf_add_local_field_group()
is run from theinit
hook, not one of theadmin_*
hooks.
If you can figure this out, I’d be curious to know, too.
Hope, this helps,
Andreas
I’m pretty much using ACF out of the box too, just using get_field and the_field to retrieve the values. I think it is only happening on archives.
Another person made the same complaint at: https://wordpress.org/support/topic/image-field-not-returning-url-in-archive-loop-following-update-to-5-7-8/
I ended up just restoring my site to a backup from a few days ago before I updated the plugin – could not afford downtime for my client.
The topic ‘Page_Link field no longer returning UR’ 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
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.