Skip to content

Verbum Comments: fix blocked commenting from cookies - #50396

Merged
arcangelini merged 9 commits into
trunkfrom
cm-841/surface-login-requirement
Aug 4, 2026
Merged

Verbum Comments: fix blocked commenting from cookies#50396
arcangelini merged 9 commits into
trunkfrom
cm-841/surface-login-requirement

Conversation

@arcangelini

@arcangelini arcangelini commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fixes CM-841

Proposed changes

When a site requires visitors to log in before commenting, Verbum can end up in a dead end: the browser blocks the cookies the login buttons depend on, so no login options render, but the email form is still offered. The visitor writes a comment, submits it, and gets "Sorry, you must be logged in to comment."

  • Hide the email form when login is required — it can't produce an accepted comment.
  • Explain the situation instead: a short notice saying commenting needs cookie access here.
  • Disable the Comment button, and ignore the submit event if the form is submitted another way.

Only affects visitors who are already blocked. If cookies are readable, nothing changes.

Does this pull request change what data or activity we track or use?

No.

Testing instructions

You need an Atomic site with Settings → Discussion → "Users must be registered and logged in to comment" enabled, plus a browser that blocks third-party cookies (Safari by default, or Chrome with third-party cookies blocked).

Atomic matters: Verbum runs inside the Jetpack comments iframe there, so it's third-party content and its cookies get blocked. On Simple the form is first-party and this path never triggers.

  • Open a post on that site as a logged-out visitor.
  • Start typing in the comment box so the panel below it opens.
  • Before: name/email fields appear. Filling them in and submitting gets you "Sorry, you must be logged in to comment."
  • After: no email form. You get a notice reading "Your browser is blocking the cookies needed to log in and comment here. Allow cookies in your privacy settings, then reload the page." and the Comment button stays disabled.
  • Allow cookies for the site, reload, and confirm the WordPress.com and Facebook login buttons come back and commenting works as before.

Also worth a pass on a site without the login requirement, in the same browser, to confirm the email form still shows and guest commenting is untouched.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (WordPress.com Site Helper), and enable the cm-841/surface-login-requirement branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack-mu-wpcom-plugin cm-841/surface-login-requirement

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions github-actions Bot added [mu wpcom Feature] Verbum Comments Verbum, a better comment experience, app developed in the mu-wpcom plugin [Package] Jetpack mu wpcom WordPress.com Features [Status] In Progress labels Jul 10, 2026
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jul 10, 2026
@jp-launch-control

jp-launch-control Bot commented Jul 10, 2026

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 4 files.

File Coverage Δ% Δ Uncovered
projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/src/state.tsx 0/156 (0.00%) 0.00% 17 💔
projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/src/components/logged-out.tsx 0/165 (0.00%) 0.00% 10 💔
projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/class-verbum-comments.php 0/378 (0.00%) 0.00% 1 ❤️‍🩹
projects/packages/jetpack-mu-wpcom/src/features/verbum-comments/src/index.tsx 0/253 (0.00%) 0.00% -3 💚

Full summary · PHP report · JS report

If appropriate, add one of these labels to override the failing coverage check: Covered by non-unit tests Use to ignore the Code coverage requirement check when E2Es or other non-unit tests cover the code Coverage tests to be added later Use to ignore the Code coverage requirement check when tests will be added in a follow-up PR I don't care about code coverage for this PR Use this label to ignore the check for insufficient code coveage.

@arcangelini
arcangelini force-pushed the cm-841/surface-login-requirement branch from 9e1a144 to c29c92f Compare July 31, 2026 13:22
@arcangelini
arcangelini force-pushed the cm-841/surface-login-requirement branch 2 times, most recently from e530cf1 to bcab102 Compare July 31, 2026 15:38
@arcangelini arcangelini changed the title Verbum Comments: surface login requirement when in-frame social login is unavailable Verbum Comments: fix blocked-cookie detection and prevent dead-end comment submissions Jul 31, 2026
@arcangelini
arcangelini force-pushed the cm-841/surface-login-requirement branch 6 times, most recently from fc7ab6a to 3ed2d4c Compare August 3, 2026 12:01
@arcangelini
arcangelini marked this pull request as ready for review August 3, 2026 12:14
@arcangelini
arcangelini requested a review from a team August 4, 2026 13:20
@arcangelini arcangelini self-assigned this Aug 4, 2026
@arcangelini arcangelini changed the title Verbum Comments: fix blocked-cookie detection and prevent dead-end comment submissions Verbum Comments: fix blocked commenting from cookies Aug 4, 2026
…missions

- Detect unpartitioned cookie access via hasStorageAccess() instead of a
  write-and-read-back probe, which passes in a partitioned jar
- Explain to the visitor why WordPress.com login is unavailable
- Block submission when login is required but cannot be completed
@arcangelini
arcangelini force-pushed the cm-841/surface-login-requirement branch from ec98ecd to 3361e93 Compare August 4, 2026 21:14
@arcangelini
arcangelini merged commit 60c747d into trunk Aug 4, 2026
71 of 72 checks passed
@arcangelini
arcangelini deleted the cm-841/surface-login-requirement branch August 4, 2026 21:30
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. [Status] In Progress labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[mu wpcom Feature] Verbum Comments Verbum, a better comment experience, app developed in the mu-wpcom plugin [Package] Jetpack mu wpcom WordPress.com Features [Status] UI Changes Add this to PRs that change the UI so documentation can be updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants