There are 2 updates, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-69b66ffa-a4cc-4fd7-9006-31a758f5981b XWIKI-18921 Reopened

Panel Navigation: duplicated IDs

 
View issue   ·   Add comment
 

2 updates

 
cid:jira-generated-image-avatar-82e5ff20-d34e-4748-adc2-ffe8a65ddd86 Changes by Marius Dumitru Florea on 10/Sep/26 15:15
 
Resolution: Fixed
Status: Closed Reopened
 
 

1 comment

 
cid:jira-generated-image-avatar-82e5ff20-d34e-4748-adc2-ffe8a65ddd86 Marius Dumitru Florea on 10/Sep/26 15:15
 

Charpentier Lucas it looks like you missed a place where tree nodes are created. While investigating CKEditor's LinkIT#createLinkForNotExistingPage Claude found this:

 have a solid diagnosis. Let me lay it out while the agents finish.

createLinkForNotExistingPage — root cause (independent of my change)

3c08afa2004 (XWIKI-18921, Sep 9 12:12) made every tree node's rendered anchor id unique by prefixing it with the tree container's id: <treeId>-<nodeId>_anchor instead of <nodeId>_anchor. It applies that prefix in exactly two places in tree.js — the getChildren callback (server-fetched nodes) and the create_node call inside openTo (nodes past pagination) — and updated TreeElement/TreeNodeElement to match.

It missed a third node-creation path: entityResourcePicker.js:122, where the link picker's own "create page" flow calls tree.create_node(parentNode, createdNode, 'last', null) with a node spec that has no a_attr.id. So a page created through the link dialog's tree still renders an unprefixed anchor id, while TreeElement.getRenderedAnchorId now builds the prefixed one. LinkTreeElement.createNode → openTo → waitForNodeSelected therefore never matches, and times out.

Two consequences worth separating:

* The test failure is a real signal, not a flicker.
* It's also a product bug: XWIKI-18921's goal was page-wide-unique anchor ids, and nodes created via the picker still get unprefixed ones — so the duplicate-id problem it set out to fix persists on that path. The right fix is in tree.js (one place that prefixes any created node), not at the call site.