Comments (7)
I'm happy to submit a PR since this seems to be working. I'm guessing it should probably just target ACF 5.12 and above to avoid breaking any older code.
from acf-to-rest-api.
Yep seeing that here also.
from acf-to-rest-api.
Me three
from acf-to-rest-api.
I'm having a difficult time replicating this, to the point I can't submit a PR, but I believe the fix is the following:
add_action( 'rest_api_init', array( __CLASS__, 'create_rest_routes' ), 10 );
needs to be changed to:
add_action( 'rest_pre_dispatch', array( __CLASS__, 'create_rest_routes' ), 10 );
In class-acf-to-rest-api.php
from acf-to-rest-api.
Try setting "Show in REST API" to true for the field-group(s) in ACF Field Group editor. I think the setting is rather new.
from acf-to-rest-api.
@willers-pm that causes other errors in my case, but while testing some months back I noticed the schema is different anyway, so held off using the native acf rest support.
@jack-pallot yes changing rest_api_init
to rest_pre_dispatch
does fix it 🎉 That change also seems to work with ACF 5.11.4
from acf-to-rest-api.
@n-kort @jack-pallot changing rest_api_init
to rest_pre_dispatch
does fix it for me, too. Even for the "relationship"-field where activating the setting in ACF would not fix it. So thanks! :)
from acf-to-rest-api.
Related Issues (20)
- How can I populate acf relationships to resful api? HOT 1
- Start Up Guide
- Couldn't get multiple results in the same request HOT 1
- ACF to Rest Api does not work with acf-fields-in-custom-table
- Value get's updated, but new keys are not added in JSON response HOT 6
- ACF now has native support for the WP REST API
- Issue with WPML translated oprions HOT 1
- Filter products categories by ACF field
- ACF only showing image ID HOT 7
- Cannot update terms
- Problem with creating a new WooCommerce product with ACF fields HOT 1
- Problem updating ACF relationship fields
- acf return false
- Edit Custom Field Group select options via Rest API
- i can't update users acf HOT 3
- Get data not being updated
- Slow response time while using with ACF Pro Plugin.
- Filtering posts by any property HOT 1
- Post object taxonomy not showing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acf-to-rest-api.