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
{{ message }}
Repository navigation
Post editor: Preload the author of the post summary #85118
The author field of the post summary queries the users collection with include: [ id ], who: 'authors' (AuthorView in core-fields), because the single user endpoint denies access to authors without published posts for users who can't list users (see trac ticket and GB PR).
We can't preload that request though. who is deprecated in WP_User_Query since 5.9 and preloading runs during the page render, so the deprecation notice gets printed in the editor page when WP_DEBUG is on.
So in #85081 and the core backport the author preload was removed, and the author is fetched after the editor loads.
Switch AuthorView back to the single user request (for the WP versions that have the fix).
Add the author preload back in the post editor.
There might be other options too, like mapping who=authors to a capability query in WP_REST_Users_Controller, or reading the author from the post record. Thoughts?
Activity