Automattic / Co-Authors-Plus

Multiple bylines and Guest Authors for WordPress
https://wordpress.org/plugins/co-authors-plus/
GNU General Public License v2.0
290 stars 205 forks source link

Authors not being updated in the editor / redux store #934

Open juliobranha opened 1 year ago

juliobranha commented 1 year ago

When editing a post, after clicking update authors are not displayed properly in the editor. New authors display fine in the front end and API endpoint wp/v2/posts/{$POST_ID}. But they don’t if you refresh the post in the editor (back to old ones). Eventually, after some time you get the new ones in the editor, but if you update the post before, it will revert to the old ones. So it looks like the terms are saved as expected but there is some caching issue with the redux store, or the store is not updating properly, so if I do wp.data.select( 'cap/authors' ).getAuthors({$POST_ID}), we getting the old authors. It doesn't seem to be the same issue as https://github.com/Automattic/Co-Authors-Plus/pull/920 or 3.5.10 release didn't seem to address it properly. Note this is not happening in my local installation, just in the production and lower environments.