You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened.
When selecting a parent page in the Page Attributes panel for a hierarchical Custom Post Type, a jQuery initiated REST request is sent to the server resulting in a 404. I believe the request is using pages instead of the Custom Post Type name.
https://s.b/cwiccer/wp-json/wp/v2/pages/1413
In this example the selected hierarchical post's ID was 1413.
This request appears to be coming from jQuery and is being invoked by WordPress SEO.
The request is not performed when WordPress SEO is deactivated.
Please describe what you expected to happen and why.
I don't expect a 404.
If any request is to be performed I expect it to be for the selected CPT.
How can we reproduce this behavior?
Create a hierarchical Custom Post Type, e.g. hierarchical, which supports page-attributes.
Create a hierarchical post called H1.
Create a new hierarchical post called H1.1.
Open the inspector and view the Network tab.
In the Page Attributes panel choose H1 as the Parent Page.
See the XHR request being fired off, the 404 response, and messages in the console.
Technical info
If relevant, which editor is affected (or editors):
Classic Editor
Gutenberg
Classic Editor plugin
Which browser is affected (or browsers):
Chrome
Firefox
Safari
Other
Used versions
WordPress version: 5.5.1
Yoast SEO version: 14.9
Gutenberg: 9.0.0 - but problem occurs when activated or deactivated
Gutenberg plugin version:
Classic Editor plugin version:
Relevant plugins in case of a bug:
Tested with theme: TwentyTwenty
I used my plugin called oik-types to create the hierarchical CPT used for this test.
I did not set any values for rest_base or rewrite.
Was able to reproduce. Looking at where / why this happens, it doesn't seem to affect much in terms of functionality.
For any developers looking to reproduce this, you can alter the Yoast Test Helper code (in src -> post-types.php) like this; replace private $movie_args with the following array (making it hierarchical):
Please give us a description of what happened.
When selecting a parent page in the Page Attributes panel for a hierarchical Custom Post Type, a jQuery initiated REST request is sent to the server resulting in a 404. I believe the request is using
pages
instead of the Custom Post Type name.In this example the selected
hierarchical
post's ID was1413
.This request appears to be coming from jQuery and is being invoked by WordPress SEO.
The request is not performed when WordPress SEO is deactivated.
Please describe what you expected to happen and why.
How can we reproduce this behavior?
hierarchical
, which supportspage-attributes
.Technical info
Used versions
hierarchical
CPT used for this test.rest_base
orrewrite
.The text was updated successfully, but these errors were encountered: