Skip to content

Real-time collaboration: Fix comment syncing on site editor#10981

Closed
alecgeatches wants to merge 2 commits intoWordPress:trunkfrom
alecgeatches:fix/rtc-site-editor-comments
Closed

Real-time collaboration: Fix comment syncing on site editor#10981
alecgeatches wants to merge 2 commits intoWordPress:trunkfrom
alecgeatches:fix/rtc-site-editor-comments

Conversation

@alecgeatches
Copy link
Copy Markdown

Backport fix for "Disconnected" dialog in the site editor when real-time collaboration is enabled. See related Gutenberg fix in WordPress/gutenberg#75746:

What?

When comments are a part of the post template, the site editor will show a "Disconnected" dialog when real-time collaboration is enabled:

image

This can be replicated by:

  1. Disable RTC via WordPress Admin -> Settings -> Writing, and uncheck the "Enable real-time collaboration" checkbox. Click the "Save Changes" button.

  2. Go to WordPress Admin -> Appearance -> Editor.

  3. Edit the post template to include comments and then click "Save":

    Screen.Recording.2026-02-19.at.12.09.45.PM.mov
  4. Re-enable RTC.

  5. Go back to the appearance editor and wait a bit.

  6. See the "Disconnected" dialog above.

Why?

When comments are present on the site editor page, we request entity rooms for individual comments loaded on the page, like root/comment:1, root/comment:2, etc. Due to the fact that these have specified object IDs, this part of the code returns false and returns a 401 to the user, triggering the dialog.

How?

The fix here adds a special case for comments with specified IDs and does a special check against the comment. This isn't particularly robust for other special cases we may run into, but it does allow subscriptions to individual comment rooms.

Trac ticket: https://core.trac.wordpress.org/ticket/64622

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 19, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props alecgeatches, czarate.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link
Copy Markdown

Hi @alecgeatches! 👋

Thank you for your contribution to WordPress! 💖

It looks like this is your first pull request to wordpress-develop. Here are a few things to be aware of that may help you out!

No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.

Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making.

More information about how GitHub pull requests can be used to contribute to WordPress can be found in the Core Handbook.

Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook.

If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook.

The Developer Hub also documents the various coding standards that are followed:

Thank you,
The WordPress Project

…r.php

Co-authored-by: Chris Zarate <chris@zarate.org>
@github-actions
Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@github-actions
Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 61702
GitHub commit: 702af38

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions bot closed this Feb 20, 2026
@ellatrix ellatrix reopened this Feb 20, 2026
pento pushed a commit that referenced this pull request Feb 20, 2026
Developed in #10981.
See also WordPress/gutenberg#75746.

Props alecgeatches, czarate.
See #64622.

git-svn-id: https://develop.svn.wordpress.org/trunk@61704 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Feb 20, 2026
@github-actions
Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 61746
GitHub commit: 91f6c42

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants