Automattic / Automattic/jetpack
Comments: form uses wrong comment ID when user is logged in locally, logged out from wpcom
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
Steps to reproduce:
1. Under Settings > Discussion, check that box:
> Users must be registered and logged in to comment
2. Log out of your site.
3. Log back in during a different account.
4. Log out of WordPress.com.
5. Open a post, and leave a comment.
6. The comment will be left under another post, using post ID `14`. That post ID is the same on 2 different blogs where I followed the steps above.
Here is how the comment form looks like in the inspector:
- When logged in to WordPress.com (looking good):

- When logged out:

Reported here:
https://wordpress.org/support/topic/comments-appear-under-wrong-post-jetpack2016
Contributor guide
Research direction
Reproduce the listed login and logout sequence, then inspect the comment form on the affected post and compare its post ID with the logged-in WordPress.com case. Trace where the form obtains that ID; done means the comment is submitted under the post being viewed rather than post ID 14.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100