acf-medium-editor
acf-medium-editor copied to clipboard
REST API error when using acf_medium as repeater subfield
When I set a repeater subfield to Medium Editor:
in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php on line 11
Call stack:
acf_get_field_rest_schema()
wp-content/plugins/advanced-custom-fields-pro/pro/fields/class-acf-field-repeater.php:1132
acf_field_repeater::get_rest_schema()
wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php:11
acf_get_field_rest_schema()
wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/class-acf-rest-api.php:112
ACF_Rest_Api::get_schema()
wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/class-acf-rest-api.php:64
ACF_Rest_Api::register_field()
wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/class-acf-rest-api.php:35
ACF_Rest_Api::initialize()
wp-includes/class-wp-hook.php:303
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:327
WP_Hook::do_action()
wp-includes/plugin.php:470
do_action()
wp-includes/rest-api.php:537
rest_get_server()
wp-includes/rest-api.php:363
rest_api_loaded()
wp-includes/class-wp-hook.php:303
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:327
WP_Hook::do_action()
wp-includes/plugin.php:518
do_action_ref_array()
wp-includes/class-wp.php:388
WP::parse_request()
wp-includes/class-wp.php:750
WP::main()
wp-includes/functions.php:1291
wp()
wp-blog-header.php:16
require()
index.php:17```
What is the error? What you pasted is cut off at the beginning.
Hi @Hube2 , I'm also having this error. I have verified that the error appears with versions 5.11.4 and 5.12 of Advanced Custom Fields Pro. With version 5.10.2 and 5.11.2 it does not appear, so I have made a rollback to that version.
The problem also appears when you enter with Gutemberg to edit any post, as this consumes the API.
Also, even when the field is not a subfield, the info doesn't appear in the API.
I can provide full access to a WP instalation if needed. I am also looking to see if I could do a PR to fix the problem, but I would need a little guidance on where to start looking as I am not an expert developer.
<b>Fatal error</b>: Uncaught Error: Call to undefined method stdClass::get_rest_schema() in /home/acftest/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php:11
Stack trace:
#0 /home/acftest/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/fields/class-acf-field-group.php(676): acf_get_field_rest_schema(Array)
#1 /home/acftest/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php(11): acf_field__group->get_rest_schema(Array)
#2 /home/acftest/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/class-acf-rest-api.php(112): acf_get_field_rest_schema(Array)
#3 /home/acftest/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/class-acf-rest-api.php(64): ACF_Rest_Api->get_schema()
#4 /home/acftest/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/cl
Duplicate of #ass-acf-rest-api.php(35): ACF_Rest_Api->register_field()
#5 /home/acftest/public_html/wp-includes/c in <b>/home/acftest/public_html/wp-content/plugins/advanced-custom-fields-pro/includes/rest-api/acf-rest-api-functions.php</b> on line <b>11</b><br />

Same error here