WPIntell

Source evidence

Error 500 if _embed=1 parameter is provided

REST API Toolbox · support · 2022-03-18T11:10:00+00:00

complaintsentiment
highseverity
0.97relevance
1replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 33 rows with source links

12.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
David Marín Carreño unresolved
In our site I’ve checked that _embed=1 parameter is added to the REST API URL, a fatal error is generated: PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::get_matched_route() in /var/www/html_dev5/wp-includes/rest-api.php:765 Stack trace: #0 /var/www/html_dev5/wp-includes/class-wp-hook.php(303): rest_send_allow_header(Object(WP_Error), Object(WP_REST_Server), Object(WP_REST_Request)) #1 /var/www/html_dev5/wp-includes/plugin.php(189): WP_Hook->apply_filters(Object(WP_Error), Array) #2 /var/www/html_dev5/wp-includes/rest-api/class-wp-rest-server.php(701): apply_filters('rest_post_dispa...', Object(WP_Error), Object(WP_REST_Server), Object(WP_REST_Request)) #3 /var/www/html_dev5/wp-includes/rest-api/class-wp-rest-server.php(551): WP_REST_Server->embed_links(Array, true) #4 /var/www/html_dev5/wp-includes/rest-api/class-wp-rest-server.php(474): WP_REST_Server->response_to_data(Object(WP_REST_Response), true) #5 /var/www/html_dev5/wp-includes/rest-api.php(370): WP_REST_Server->serve_request('/wp/v2/posts') #6 /var/www/html_dev5/wp-includes/class-wp-hook.php(303): rest_api_loaded(Object(WP)) #7 /var/www/html_dev5/wp-i in /var/www/html_dev5/wp-includes/rest-api.php on line 765 For example, the URL that generates the error is: /wp-json/wp/v2/posts?_embed=1&post_type=post:page&per_page=6&search=blog If I deactivate the REST API Toolbox plugin, that call returns the corresponding posts without any problem. Also, the call: /wp-json/wp/v2/posts?post_type=post:page&per_page=6&search=blog works correctly without deactivating the plugin. This topic was modified 4 years, 2 months ago by David Marín Carreño . Do you have any additional steps on how to replicate this, or how you have the plugin configured? So far, I haven’t been able to replicate this with the current version of WordPress (6.0.2)

Comments

1 shown
Pete Nelson 2022-09-09T22:39:00+00:00

Do you have any additional steps on how to replicate this, or how you have the plugin configured? So far, I haven’t been able to replicate this with the current version of WordPress (6.0.2)