-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Value get's updated, but new keys are not added in JSON response #394
Comments
Just gonna note that adding fields to non-flexible content fields seems to work. Just added fields to an options page with a plain hierarchy, and that worked just fine. Will try to investigate a bit more. But a bit hard when I don't know how everything is connected among pages and meta data. |
I am having a similar issue. I am not using Flexible fields. |
@danimalweb |
I think I am experiencing the same issue, though mine is with a custom field group that was added to users. Whilst the values on these fields appears to be persisted (from some business logic when a user registers), none of the values make it into the JSON response until I go in and edit them manually (or re-save the account) from within WP Admin. I've included two screenshots, one which shows how many lines present in the JSON response before re-saving the account (175 lines) and the second one after saving (178 lines). Strangely, in the ACF group, one of the fields does come through every time - it only seems to be a recently added fields that are not appearing. Also other ACF groups work perfectly all the time. I would love to help track down this issue and work on a fix - as it is really affecting the operation of my site (as I need to go in and re-save every new user!) |
Hi @airesvsg Any idea about this - it's causing me huge issues with using this plugin as some fields are missing on the API, even though there are values set on the user object! |
Was doing some further investigation today... It seems that all ACF fields are being returned if I use the WooCommerce API |
For some weird reason (not sure if it's related to this great plug-in, or some server setup), suddenly (it did work before) new changes in ACF (adding new fields) doesn't show up in the JSON output.
So ex: I have a flexible content array with some components inside (acf_fc_layout). When I add a new component there with some fields in, the only thing showing up in the REST API JSON response is
acf_fc_Layout: "name_of_component"
. No other fields are visible.But on older components that has many key value pairs already, I can change the content and the value will update. So it's not a cache issue with the entire JSON file. And everything looks perfectly fine in wp-admin, and I think it looks correct in the DB as well. But a bit hard to know.
So seems to be something wrong between the DB and ACF to REST API plug-in and how that returns the JSON response.
Any idea how to debug or finding the root cause of this weird issue?
Ex response:
(replace [slash] with / in url:s, just making it hard for bots here on github :D)
/wp-json/preview/v1/1419 -> acf -> fields[2]. Here there should be a
isBookingZone: true
, that is visible and working in both WordPress and the database, but it is not showing up here in the response. But changing title returns correct value.Also attaching the ACF setup for this
category_grid_artists
componentThe text was updated successfully, but these errors were encountered: