Hi,

I've noticed that when moving a tree "to bottom" in site management (right
click -> move -> move to bottom), the tree gets corrupted.

It does not occur for 'move up', 'move to top', or 'move down'.

What happens is the parent node of the item being moved gets given an
incorrect nright value. The value it is given appears to be the value if the
item being moved wasn't there at all.

This demonstrates the problem:

How it was:
+------------+-------+--------+--------+
| objectname | nleft | nright | nlevel |
+------------+-------+--------+--------+
| Main Item  |    13 |     24 |      2 |
| Sub Item 1 |    14 |     15 |      3 |
| Sub Item 2 |    16 |     17 |      3 |
| Sub Item 3 |    18 |     19 |      3 |
| Sub Item 4 |    20 |     21 |      3 |
| Sub Item 5 |    22 |     23 |      3 |
+------------+-------+--------+--------+

The "Sub Item 1" was "moved to bottom"

How it is:
+------------+-------+--------+--------+
| objectname | nleft | nright | nlevel |
+------------+-------+--------+--------+
| Main Item  |    13 |     22 |      2 |
| Sub Item 2 |    14 |     15 |      3 |
| Sub Item 3 |    16 |     17 |      3 |
| Sub Item 4 |    18 |     19 |      3 |
| Sub Item 5 |    20 |     21 |      3 |
| Sub Item 1 |    22 |     23 |      3 |
+------------+-------+--------+--------+

How it should be:
+------------+-------+--------+--------+
| objectname | nleft | nright | nlevel |
+------------+-------+--------+--------+
| Main Item  |    13 |     24 |      2 |
| Sub Item 2 |    14 |     15 |      3 |
| Sub Item 3 |    16 |     17 |      3 |
| Sub Item 4 |    18 |     19 |      3 |
| Sub Item 5 |    20 |     21 |      3 |
| Sub Item 1 |    22 |     23 |      3 |
+------------+-------+--------+--------+

Note the difference in the nright value for "Main Item"

It appears to be contained only within the relevant section of the tree

I think the problem lies somewhere in the
farcry_core/packages/farcry/_tree/moveBranch.cfm file.

System info:
 - FarCry b127
 - Windows 2000
 - MySQL 4.0.13

Any feedback is welcome

Feel free to flame if this has been raised previously but i couldn't find it
on the known issues list or in the mailing list.

Cheers

--
Quentin Zervaas
Email: [EMAIL PROTECTED]



---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to