Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Simple site :: Password-protected page :: Comments cannot be posted #72981

Open mdtanjid0 opened 1 year ago

mdtanjid0 commented 1 year ago

Quick summary

The comment isn't working on the Simple site with Password Protected pages.

So far the issue is replicateable with the Shoreditch theme. Updated by @worldomonation: theme does not appear to matter. Reproduced on 2023 theme.

This error appears after submitting the form:

Screen Shot on 2023-02-05 at 14:33:01

Steps to reproduce

  1. Create a page or post.
  2. If using page, add a Comment block and enable comments if required.
  3. Make it password protected.
  4. Submit a test comment on the page as a logged out user (eg. using Browser private mode).

What you expected to happen

User is able to submit comments. User sees a comment Your comment is awaiting moderation. This is a preview; your comment will be visible after it has been approved., similar to when a comment is left on a public page/post.

What actually happened

An error message, Sorry, this comment could not be posted. is shown:

Screen Shot on 2023-02-05 at 14:33:01

Impact

Some (< 50%)

Available workarounds?

No but the platform is still usable

Platform (Simple and/or Atomic)

Simple

Logs or notes

I could replicate the issue with Shoreditch theme.

I noticed that while working on this ticket 5886857-zd

github-actions[bot] commented 1 year ago

Support References

This comment is automatically generated. Please do not edit it.

mdtanjid0 commented 1 year ago
dpasque commented 1 year ago

Adding some triage scrubbing notes:

.Org self-hosted site: Does not reproduce -- this is unique to WPCOM. Simple sites: Reproduced as written Atomic sites: Behavior is a little bit different, but is still broken. When you submit the comment, the comment area just becomes blank. The comment doesn't actually go through on the backend.

Screen Shot 2023-02-22 at 11 04 19 AM

The issue is not theme-specific, I was able to reproduce on other themes!

This definitely warrants a high priority.

cuemarie commented 1 year ago

Regarding the Atomic behavior, that may be already reported here:

cuemarie commented 1 year ago

šŸ“Œ SCRUBBING : RESULT - Replicated / Could Not Replicate / Uncertain

šŸ“Œ FINDINGS/SCREENSHOTS/VIDEO

Twenty Twenty Three

https://github.com/Automattic/wp-calypso/assets/27249804/2bc92c9d-b371-46bc-82e6-5dbfc156b138

Shoreditch

https://github.com/Automattic/wp-calypso/assets/27249804/58b38aab-6b44-492c-969a-7e81e015552a

https://github.com/Automattic/wp-calypso/assets/27249804/9cf8cbbd-6e08-4a7e-80eb-760e6e2db906

šŸ“Œ ACTIONS

šŸ“Œ Message to Author

mdtanjid0 commented 1 year ago

@cuemarie Yes, you would need to check with a comment block, not the default comment.

And then try with a private window.

I am still able to replicate it with Shoreditch theme.

Here is a brief video to demonstrate the issue:

https://github.com/Automattic/wp-calypso/assets/54123436/abdfb144-caa0-4a43-b065-5a4630337d61

I hope that helps you!

worldomonation commented 1 year ago

šŸ“Œ REPRODUCTION RESULTS Tested on Simple ā€“ reproduced Tested on Atomic ā€“ not tested Replicable outside of Dotcom ā€“ not tested

I've updated the initial reproduction steps as the steps were not entirely clear to me.

šŸ“Œ FINDINGS/SCREENSHOTS/VIDEO Simple Three screenshots showing the different combinations of commenting:

image

šŸ“Œ ACTIONS

šŸ“Œ JUSTIFICATION

The flow to trigger this issue is very specific, resting on the fact that someone that does not have a WordPress.com account wants to leave a comment on a private post.

worldomonation commented 1 year ago

Addendum: when posting the comment, a HTTP 500 is returned. Nothing seems too out of the ordinary to me though.

Headers

Request URL:
https://<redacted>.wordpress.com/wp-comments-post.php
Request Method:
POST
Status Code:
500
Remote Address:
127.0.0.1:8080
Referrer Policy:
strict-origin-when-cross-origin

Payload

hc_post_as: guest
comment: Test 
email: <redacted>
author: Logged out user
url: 
wp_avatar: 
wp_user_id: 
wp_access_token: 
fb_avatar: 
fb_user_id: 
fb_access_token: 
submit: Post Comment
comment_post_ID: 58
comment_parent: 0
akismet_comment_nonce: f0bf9f5110
genseq: 1686547714
ak_hp_textarea: 
ak_js: 1686547714802
ak_bib: 1686547717782
ak_bfs: 1686547722728
ak_bkpc: 4
ak_bkp: 35,74;119,32;103,29;102,74;
ak_bmc: 77;76,1207;88,465;100,3421;
ak_bmcc: 4
ak_bmk: -1
ak_bck: 
ak_bmmc: 4
ak_btmc: 0
ak_bsc: 2
ak_bte: 
ak_btec: 0
ak_bmm: 949,94;667,469;1792,279;59,1294;