Ticket #1841 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

CPSTreeViewEditor has problems with identical node ids

Reported by: mschulz@webgis.de Assigned to: jmorliaguet
Priority: P2 Milestone: CPS 3.4.5
Component: CPSPortlets Version: TRUNK
Severity: normal Keywords:
Cc:

Description

It seems the CPSTreeViewEditor cannot handle a tree where two nodes have the same id.

This is the behaviour: After loading the tree (in navigation - dynamic treeview), several root nodes are displayed, when opening a node and other nodes are loaded, one with an id, that was already present, the branches behind the first node are not accessible, instead when clicking on [+/-] the second node opens and closes.

I assume this is due to the fact, that the "load-caller-..." and "load-area-..." only take the id of a node into account.

Change History

09/18/07 12:00:30 changed by madarche

Could you try to provide a fix for this bug please ?

Please also think about updating any impacted tests included with CPS products.

09/18/07 23:07:53 changed by mschulz@webgis.de

  • status changed from new to closed.
  • resolution set to worksforme.

I have solved my problems using the following fix. This is against cps 3.4.3:

diff tree_macros.pt tree_macros.pt.orig 6c6 < tal:attributes="id python:'load-caller-%s' % nodesafe_url?; ---

tal:attributes="id python:'load-caller-%s' % nodeid?;

15c15 < tal:attributes="id python:'load-caller-%s' % nodesafe_url?; ---

tal:attributes="id python:'load-caller-%s' % nodeid?;

33c33 < <div class="load-area" tal:attributes="id python:'load-area-%s' % nodesafe_url?" ---

<div class="load-area" tal:attributes="id python:'load-area-%s' % nodeid?"

39c39 < <div class="load-area" tal:attributes="id python:'load-area-%s' % nodesafe_url?"> ---

<div class="load-area" tal:attributes="id python:'load-area-%s' % nodeid?">

By using the safe-url also for the load-area ids Treeview can handle nodes with identical ids.