Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author apasionados

    (@apasionados)

    Hi @kuldeep3020,

    On the screenshot there are no recently edited posts shown. All are from 2021 and one from April 2022. Please try editing a post with the current user and let’s see what happens.

    The plugin gets the information from the WordPress function get_the_modified_author(). If this function returns an empty value, we show UKNOWN.

    This function returns empty values if the user that modified the post doesn’t exist any more. So please try with your current active user and let’s see what happens.

    Hope this helps.

    Best regards from Spain.

    Thread Starter kuldeep3020

    (@kuldeep3020)

    Hi

    I have again edit the page and its still showing unknown. User is in activate state.
    Please find below link :

    View post on imgur.com

    Thanks,
    Kuldeep

    Plugin Author apasionados

    (@apasionados)

    That’s really strange. get_the_modified_author() gets the ID of the user that last edited the post or page.

    It queries the table with the post metadata (normally wp_postmeta if the $table_prefix variable in wp-config.php is wp_) and looks for the meta_key “_edit_last” where the meta_value is the user id of the user that made the edit.

    If there is no _edit_last meta_key associated to the post id, the user is UNKNOWN.

    Could you please check if for the last post you edited there is an associated meta_key “_edit_last“?

    You could get the information with a database query similar to this one:
    SELECT * FROMwp_postmetaWHEREpost_id= 8313 ANDmeta_keyLIKE '%_edit_last%'
    changing the post_id to your post_id.

    If this doesn’t return a result something weird is happening in the WordPress installation which we can’t solve. If this returns a result like this:

    meta_id: 23921
    post_id: 8313
    meta_key: _edit_last
    meta_value: 1

    Next would be to look up if there is a user with ID = 1. With something like this:
    SELECT * FROMwp_usersWHEREID= 1

    If this doesn’t return a result then the user doesn’t exist and our plugin will show it as UKNOWN. If this returns a result next would be to trace the get_the_modified_author() function to see why it isn’t returning the correct info.

    Could you please check this?

    Best regards from Spain.`

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Unknown user is showing after editing page’ is closed to new replies.