WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#43780 closed defect (bug) (wontfix)

Class "bypostauthor" isn't always added

Reported by: maddyra Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Comments Keywords:
Focuses: Cc:

Description

When the author of an article replies to a comment, the class "bypostauthor" sometimes is not added to the author's comment. This is the case with multiple authors. The authors have the same user role.

When checking the database I noticed the user_id is 0 for the comments that don't get "bypostauthor". I can't discover why in some cases the user_id isn't added. I have one case where an author has placed 2 comments. At first the user_id is saved with the comment, but 8 months later it is not.

Change History (7)

#1 @subrataemfluence
3 years ago

  • Keywords reporter-feedback added

Interesting!

Are you sure it is not theme specific and tested with all third party plugins disabled?

Is this possible for you to test it on a fresh installation with a WordPress native theme applied?

#2 @maddyra
3 years ago

Thank you for your quick reply. Good point to test with all plugins disabled. I will try that first.

#3 follow-up: @SergeyBiryukov
3 years ago

  • Component changed from General to Comments

Hi @maddyra, welcome to WordPress Trac! Thanks for the report.

user_id is only added if the comment author is logged in when leaving a comment. Could you make sure that's the case?

Last edited 3 years ago by SergeyBiryukov (previous) (diff)

#4 @subrataemfluence
3 years ago

As Sergey mentioned, guest comments do not store a user_id. However, when commenting as a guest you need to provide your name and email address which are not required when a logged in user leaves a comment. Are you sure you are not commenting as a guest?

And for guest comments bypostauthor class is not added.

Last edited 3 years ago by subrataemfluence (previous) (diff)

#5 in reply to: ↑ 3 @maddyra
2 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

Replying to SergeyBiryukov:

Hi @maddyra, welcome to WordPress Trac! Thanks for the report.

user_id is only added if the comment author is logged in when leaving a comment. Could you make sure that's the case?

Thank you for your answer. We have multiple authors who use the comment section. It indeed seams to be the case they are not always logging in when they place a reaction to a comment. Mystery solved. :)

#6 @maddyra
2 years ago

  • Keywords reporter-feedback removed

#7 @SergeyBiryukov
2 years ago

  • Milestone Awaiting Review deleted

Thanks for the follow-up!

Note: See TracTickets for help on using tickets.