Home › Forums › Bug Reports › Custom field type throws fatal error › Reply To: Custom field type throws fatal error
I made an account just for this post. I’m also having roughly the same issues. I’m trying to access a custom post type in the rest api, but get the follow stack trace:
[14-Mar-2022 15:30:35 UTC] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::get_rest_schema() in /Users/nnn/Local Sites/ff2022/app/public/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php:11
Stack trace:
#0 /Users/nnn/Local Sites/ff2022/app/public/wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-flexible-content.php(1780): acf_get_field_rest_schema(Array)
#1 /Users/nnn/Local Sites/ff2022/app/public/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php(12): acf_field_flexible_content->get_rest_schema(Array)
#2 /Users/nnn/Local Sites/ff2022/app/public/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/class-acf-rest-api.php(112): acf_get_field_rest_schema(Array)
#3 /Users/nnn/Local Sites/ff2022/app/public/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/class-acf-rest-api.php(64): ACF_Rest_Api->get_schema()
#4 /Users/nnn/Local Sites/ff2022/app/public/wp-content in /Users/jordanlewis/Local Sites/ff2022/app/public/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php on line 11
The custom post type has flexible content available to it, and this flexible content has quite a few layouts. When I query a different custom post type that does not have flexible content available to it, I’m able to get the information.
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βre excited to announce we've released Composer support for installing ACF PRO.
— Advanced Custom Fields (@wp_acf) January 31, 2023
π #ComposerPHP fans rejoice!
β¨ Please see the release post for all the details and full instructions. https://t.co/ebEfp61nlR
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.