This issue has been created
There are 3 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-addce062-2ffe-44d8-8bfa-622bc6d5436e XWIKI-25598 In Progress

Block parameters, link references and verbatim code blocks are lost when another BlockNote realtime collaborator saves

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-e86c1c26-2d7f-48bc-b52c-0d78d2a2e507 Marius Dumitru Florea created this issue on 27/Oct/26 12:21
 
Summary: Block parameters, link references and verbatim code blocks are lost when another BlockNote realtime collaborator saves
Issue Type: cid:jira-generated-image-avatar-addce062-2ffe-44d8-8bfa-622bc6d5436e Bug
Affects Versions: 18.7.0-rc-1
Assignee: Unassigned
Components: BlockNote
Created: 27/Oct/26 12:21
Priority: cid:jira-generated-image-static-major-eafd2007-60c2-4bac-b82e-541a0128f649 Major
Reporter: Marius Dumitru Florea
Description:

Problem

When several users edit the same page with the BlockNote editor in realtime, some information from the page content is preserved only by the editor of the user who started the collaboration session. If the content is saved by any other participant (explicit save, or auto-save, which can be done by any participant), this information is lost:

  • the parameters of blocks such as paragraphs, headings, lists or tables (e.g. (% class="..." %))
  • the resource reference and parameters of links (internal page / attachment links), as well as whether a link is free-standing or has a generated label
  • the verbatim flag and the leading / trailing new lines of code blocks (a verbatim block can be saved as a code macro, and leading / trailing new lines can be lost)

The same happens if the user who started the session reloads the editor while the session is still alive.

Steps to reproduce

  1. Create a page with a link to another wiki page (e.g. [[Label>>Sandbox.WebHome]]), a paragraph with parameters (e.g. (% class="box" %)) and a verbatim block.
  2. Alice edits the page with BlockNote (in-place or standalone).
  3. Bob joins the collaboration session, makes a change and saves.
  4. Look at the page source.

Expected: only Bob's change is saved.
Actual: the paragraph parameters, the link reference / parameters and the verbatim block information are lost or altered.

Cause

When loading the content, XWikiBlockNoteProcessor moves this metadata out of the edited content (because the BlockNote editor doesn't support it) and keeps it in a per-client BlockNoteDocument metadata store keyed by block / link id. This store is not part of the shared Y.Doc. The participants that join the session get the content (with the ids) from the Y.Doc, but their metadata store doesn't have entries for these ids, so the metadata is not restored on save.

Possible fix

This metadata comes from the page source and isn't private, so it can be shared with the other participants through the Y.Doc (e.g. a Y.Map keyed by the same ids, written by the client that seeds the session in the same transaction as the content). The macro output, which is rendered for the current user, must stay out of it (see XWIKI-24374).

This is also needed for re-rendering the macros of each participant, since the content sent to the server for rendering must be complete.

 
 

3 updates

 
cid:jira-generated-image-avatar-e86c1c26-2d7f-48bc-b52c-0d78d2a2e507 Changes by Marius Dumitru Florea on 27/Oct/26 12:21
 
Fix Version: 18.10.0-rc-1
Assignee: Marius Dumitru Florea
Status: Open In Progress