This issue has been created
There is 1 update, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-63f7313a-7f34-4b55-b12a-b52587e34a54 XWIKI-22290 Open

The edited content is re-rendered even when no macro is modified

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-132932e4-ce4d-4777-adff-76c5f8c33ee0 Marius Dumitru Florea created this issue on 21/Jun/24 16:58
 
Summary: The edited content is re-rendered even when no macro is modified
Issue Type: cid:jira-generated-image-avatar-63f7313a-7f34-4b55-b12a-b52587e34a54 Bug
Affects Versions: 15.10.10, 16.4.0
Assignee: Unassigned
Components: Realtime
Created: 21/Jun/24 16:58
Priority: cid:jira-generated-image-static-critical-63f23c9d-fca6-4cda-ba09-58e974c3aa3a Critical
Reporter: Marius Dumitru Florea
Description:

Follow these steps to reproduce:

  • edit a new page in realtime (tab one)
  • edit the same page in a second browser tab
  • in the first tab insert a table and then an info box inside one of the table cells
  • open the Network tab and clear the request log
  • switch to the second tab and type something in the table or after it, but outside the info macro
  • switch to the first tab and check the request log

There shouldn't be any requests to HTMLConverter to reload the content because the second tab modifies only content outside the macro. Still, we can see a re-render request for each change produced on the second tab.

This is a serious issue because it prevents the user on the first tab to edit: the content gets refreshed each time the second user types. Not to mention the performance penalty to re-render the content on each keystroke.

 
 

1 update

 
cid:jira-generated-image-avatar-132932e4-ce4d-4777-adff-76c5f8c33ee0 Changes by Marius Dumitru Florea on 21/Jun/24 16:58
 
Assignee: Marius Dumitru Florea
 
 

1 comment

 
cid:jira-generated-image-avatar-132932e4-ce4d-4777-adff-76c5f8c33ee0 Marius Dumitru Florea on 21/Jun/24 17:06
 

I debugged the issue, and it seems the problem is that the info box macro appears to be modified. This is the difference:

  • old content
    <xwiki-widget-xwiki-macro class="xwiki-widget" value="{&quot;classes&quot;:{&quot;macro&quot;:1},&quot;content&quot;:&quot;Type your information message here.&quot;,&quot;inline&quot;:true,&quot;name&quot;:&quot;info&quot;,&quot;parameters&quot;:{}}" data-widget-id=""></xwiki-widget-xwiki-macro>
    
  • new content
    <xwiki-widget-xwiki-macro class="xwiki-widget" value="{&quot;classes&quot;:{&quot;macro&quot;:1},&quot;content&quot;:&quot;Type your information message here.&quot;,&quot;inline&quot;:false,&quot;name&quot;:&quot;info&quot;,&quot;parameters&quot;:{}}" data-widget-id=""></xwiki-widget-xwiki-macro>
    

As you can see the problem is that:

  • the info box is rendered as inline when inside a table cell
  • somehow when we load the new content under the hood (in order to be able to compute the patch), the info box is rendered as block

The editor sees this as a macro parameter change and forces a re-render of the content.