Bug #20696
closed
Expanding pagetree with multiple mountpoints removes following mountpoints in Firefox
Added by Andreas Kießling over 15 years ago.
Updated about 13 years ago.
Description
Having more than one mountpoint creates a wrong nesting of <div> and <li> tags, because they are not closed. (Just count the number of <li> tags)
To reproduce: A user has more than one mountpoint and all are initially cloased. Expand the first mountpoint and all following mountpoints are gone, because the javascript replaces the node.
This only happens, if a mountpoint is collapsed in the initial load, collapsing an expanded node and re-opening works fine.
The wrong nesting is also present in 4.2.6 , but the structure is a bit different and Firefox seems to "fix" this on its own.
(issue imported from #M11446)
Files
This should look this way:
Having more than one mountpoint creates a wrong nesting of <div> and li tags, because they are not closed. (Just count the number of li tags)
i can reproduce this and this definitly is leading to problems in any browser and also in 4.2.6 cause in a project, after closing pages, big parts of the tree are missing but will come back when pressing the refresh-icon
Problem is in the hardcoded true for $hasSub in function getBrowsableTree in class.webpagetree.php that builds up the tree array. When the tree gets rendered, the div and li never get closed. I've attached a patch that sets the flag to true, only if it really has subpages. Additionally, the div and li has to be closed, if a mountpoint has subpages, but is not expanded.
I will be testing my patch with a larger pagetree tomorrow. On my local test-setup the tree looks fine and expanding works like a charm.
is this bug still present and not fixed by 11482?
11482 fixes the bug, so that the db mounts don't disappear when expanding one.
The HTLM structure is still not correct, but my patch doesn't seem to fix that either. I thought it did, but with beta 3 the number of opening and closing li's don't match, neither with nor without my patch.
In FF 3.5.5, the current beta 3 works, but i don't know about other browsers.
The goal should be, to output a valid html structure?
absolutely. Some browser are able to correct invalid html automatically, but the markup should be valid. I will look at it. Could you give me an advice / screenshot how to reproduce?
I checked my patch again, and i think i have also counted the <link tags, so it just could not fit ;)
The number of <div / </div and <li / </li match with my patch.
To reproduce:
Just create some pages that also have subpages and give a beuser the pages from the level 2 as db mounts.
So
level 1
- level 2
-- level 3
-- level 3
-- level 3
- level 2
-- level 3
-- level 3
-- level 3
- level 2
-- level 3
-- level 3
-- level 3
Then switch to that user and expand 2 mounts, leave the third closed. Then reload the page / frame / pagetree so you can view the source code of the frame (otherwise the tree has elements from ajax request)
I counted the <li and </li and the numbers didn't match (beware of the <link tags for the stylesheets at the top when counting)
To narrow the problem down: the li tag from a closed db mount is not closed. If the db mount is expanded, the li is closed.
The rendering of the pagetree is kind of confuse. Anyway i found something, but unsure if it fits all situation. Could you please test it?
I have attached a screenshot with your patch and my little test setup. I get 15 <li and 16 </li .
With the current beta 3 i get 15 <li and 14 </li tags.
Is this still relevant with the new page tree in place?
Björn Pedersen wrote:
Is this still relevant with the new page tree in place?
Nope.
Just posted a request to close this one to the newsgroup. Thanks for the reminder.
- Status changed from Accepted to Rejected
- Assignee changed from Steffen Kamper to Steffen Gebert
- Target version deleted (
0)
Also available in: Atom
PDF