-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix ajax_suggest user and guest author id collision #974
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unable to replicate this issue, and I can't see where user_type
is a recognised array key for the extra args of get_avatar_url()
.
@katag9k Can you shed some more light here please? Screenshots, quick video, please.
@GaryJones Co-Authors-Plus/co-authors-plus.php Lines 1858 to 1860 in 45dbb83
When adding authors to a post but before saving the post, the incorrect avatar will show up for users that have the same ID as the guest author post type id. |
@katag9k I'm still not seeing it. In my example, "gary" is a regular user, user_id = 7. I am logged into that account. It's my face showing as it picks up the gravatar from the user email address. It happens to also exist as a mapped guest author. ✅ The "A Guest Author" account is a guest author account, not linked to a regular user. The post_id = 7. The image matches the Set Avatar feature of editing the guest profile. ✅ When I remove the guest author avatar, then it correctly falls back to the Gravatar default image: If I remove the guest author mapping for "gary" (so it is only a regular user), then the behaviour is the same. I'm going to need more hand-holding to replicate this please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Description
Related to #960. When a WordPress user shares the same id as a guest-author post id, the CAP meta box will display the wrong avatar after searching for user or guest author.
Steps to Test
Ensure a guest author shares the same id (
post_id
) with a current WordPress user id.