|
| Summary: |
Wrong or outdated code displayed when the content of the code macro or of the content before it is dynamic |
| Issue Type: |
Bug |
| Affects Versions: |
1.0, 1.0.1 |
| Assignee: |
Unassigned |
| Created: |
12/Nov/26 10:27 |
| Priority: |
Major |
| Reporter: |
Vincent Massol |
| Description: |
The result of a code macro is cached under an id made only of the reference of the document containing the macro and of the position of the macro block in the rendered XDOM. Neither the macro content nor its parameters are part of that id, which leads to wrong content being displayed:
- Content generated by a script: when the content of the code macro is produced by a script (see the example below), the first rendered result is cached and then displayed to every other user and request, until the page is modified.
- Content placed before the macro changes: the position of the macro block is computed after the macros executed before it (e.g. script macros) have inserted their result in the XDOM. When that result varies (per user, per request parameter, over time), a code macro can get the position that another code macro of the same page had in a previous rendering, and the highlighted content of that other code macro is displayed instead.
- No source document: when the content is rendered without any source document information (e.g. a string rendered from a script), all such code macros share cache entries based on their position only, and those entries are never invalidated.
Steps to reproduce
- Create a page with the following content:
- View it as user A, then as user B
Expected User B sees their own user reference. Actual User B sees user A's reference. |
|