There are 3 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-194e8617-f33b-41f3-aa99-a3f0ddf5ebbd XWIKI-25639 Open

New realtime session does not synchronize with an existing editing session

 
View issue   ยท   Add comment
 

3 updates

 
cid:jira-generated-image-avatar-9f2b06a6-9272-4a79-87d8-38c3a79bde7d Changes by Marius Dumitru Florea on 19/Nov/26 14:32
 
Assignee: Nikita Petrenko Marius Dumitru Florea
Resolution: Duplicate
Status: Closed Open
 
 

1 comment

 
cid:jira-generated-image-avatar-9f2b06a6-9272-4a79-87d8-38c3a79bde7d Marius Dumitru Florea on 19/Nov/26 14:32
 

This is not a duplicate of XWIKI-25595 (several BlockNote fields of the same page sharing their content): it happens with different pages, edited in two tabs of the same browser.

Steps to reproduce

  1. Edit page A with BlockNote (realtime enabled).
  2. In another tab of the same browser (same host), edit page B with BlockNote.

Actual result

Page B shows the content of page A, and the changes made in one tab show up in the other, although they edit different pages. It doesn't happen with two different browsers, or with the same browser accessing XWiki through two different host names.

Cause

Besides the WebSocket connection to the server, the Yjs WebSocket provider exchanges the updates directly with the other tabs of the same browser (same origin), through a BroadcastChannel named after the endpoint URL and the room name, without the query parameters. Our server-side endpoint reads the room (the edited document and its locale) from the query parameters, so the room name we pass to the provider is the last path segment of the endpoint URL, which is the same for all the edited documents. As a consequence, all the tabs of the same browser use the same channel and exchange their updates whatever document they edit, bypassing the server.

Fix

Disable the BroadcastChannel communication (disableBc: true): each tab is connected to the server anyway, which relays the updates to the other clients of the same room.