Project

General

Profile

Actions

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.

Status:
Rejected
Priority:
Should have
Category:
-
Target version:
-
Start date:
2009-06-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

0011446.patch (1.14 KB) 0011446.patch Administrator Admin, 2009-07-05 13:13
11446_v2.diff (613 Bytes) 11446_v2.diff Administrator Admin, 2009-11-09 23:42
screenshot-11446_v2.gif (15.5 KB) screenshot-11446_v2.gif Administrator Admin, 2009-11-16 17:07
Actions #1

Updated by Andreas Kießling over 15 years ago

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)

Actions #2

Updated by Georg Ringer over 15 years ago

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

Actions #3

Updated by Andreas Kießling over 15 years ago

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.

Actions #4

Updated by Jörg Wagner about 15 years ago

This report is probably a duplicate of http://bugs.typo3.org/view.php?id=11482 which has been resolved and commited. But the patches differ considerably!

Actions #5

Updated by Steffen Kamper about 15 years ago

is this bug still present and not fixed by 11482?

Actions #6

Updated by Andreas Kießling about 15 years ago

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?

Actions #7

Updated by Steffen Kamper about 15 years ago

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?

Actions #8

Updated by Andreas Kießling about 15 years ago

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)

Actions #9

Updated by Andreas Kießling about 15 years ago

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.

Actions #10

Updated by Steffen Kamper about 15 years ago

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?

Actions #11

Updated by Andreas Kießling about 15 years ago

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.

Actions #12

Updated by Björn Pedersen about 13 years ago

Is this still relevant with the new page tree in place?

Actions #13

Updated by Andreas Kießling about 13 years ago

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.

Actions #14

Updated by Steffen Gebert about 13 years ago

  • Status changed from Accepted to Rejected
  • Assignee changed from Steffen Kamper to Steffen Gebert
  • Target version deleted (0)
Actions

Also available in: Atom PDF