rolandbaer / list-last-changes

Shows a list of the last changes of a WordPress site.
GNU General Public License v3.0
1 stars 2 forks source link

last editor empty #36

Closed rolandbaer closed 1 month ago

rolandbaer commented 1 month ago

installed WordPress 6.6.1 and Plugin and Plugin Version 1.1.1.

List Last Changes is fully functionally with the Template String “author”

If we switch to the Template String “editor” only in one Line there is an incorrect User-Name, all other Lines (we Display 100 on a page) are empty.

Checked Database wp_post and the correct names (id from wp_users) are in field post_author but no name is showed in the list. Page and Date are correct.

From https://wordpress.org/support/topic/template-field-for-editor/#post-17982330

rolandbaer commented 1 month ago

It looks like _edit_last is not set/updated properly when using the 'Gutenberg' editor: https://github.com/WordPress/gutenberg/issues/31501 https://core.trac.wordpress.org/ticket/50255

rolandbaer commented 1 month ago

First attempt was to use a 4-step-solution:

  1. try _edit_lock from post metadata
  2. try _edit_last from post metadata
  3. try post_author of newest revision of post
  4. use post_autor of post -> should always work

But the _edit_lock is updated as soon as a user opens the post in an editor. Therefore you don't get the last editor but the last user that possibly could have changed the post. And as the _edit_last entry is not handled properly only step 3 and 4 will remain.