Repository navigation
Editor: Update the post editor preload paths for the DataForm inspector - #14494
ntsekouras wants to merge 2 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| '/wp/v2/users/%d?context=view&_fields=id,name', | ||
| (int) $post->post_author | ||
| // The post summary of the inspector queries the author through the users collection. | ||
| $preload_paths[] = add_query_arg( |
There was a problem hiding this comment.
It seems who=authors passes who to WP_User_Query, which is deprecated since 5.9, and since preloading runs during the page render the notice gets printed in the editor page (that's what broke the e2e tests here).
I'm thinking we should remove this preload for now and handle who=authors in WP_REST_Users_Controller::get_items() in a separate ticket, then add it back. It would be one extra request on load until then. What do you think?
There was a problem hiding this comment.
I removed the preload, since the old author path isn't requested anymore and the new one prints the who deprecation notice. We can add it back once https://core.trac.wordpress.org/ticket/56429 is fixed and Gutenberg's AuthorView doesn't need who=authors.
How do we make sure this happens? I know @Mamaduka may be aware of this personally, but wonder what system do we have in place so this is not missed. |
|
Unfortunately, we don't have a system to queue related commits. This needs to be done manually. |
@Mamaduka I guess that should be part of the SHA change commit in core or after that change? |
|
@ntsekouras, I'll create a sync PR like #14497 after RC is released that includes that change. Once that's committed, we can commit this patch. |
Trac ticket: https://core.trac.wordpress.org/ticket/66339
Gutenberg stabilizes the DataForm-based editor inspector in WordPress/gutenberg#85081. This PR updates the post editor preload paths for the requests the new post summary makes on load:
The new author field queries the users collection with
who=authors(to work around https://core.trac.wordpress.org/ticket/56429), which is not preloaded for now because thewhodeprecation notice gets printed in the editor page during preloading.This should be committed together with the Gutenberg packages update that includes WordPress/gutenberg#85081.
Use of AI Tools
Generated with Opus 5.5 and adjusted/reviewed manually.