You are here: Foswiki>Tasks Web>Item13290 (03 Jun 2017, AdminUser)Edit Attach

Item13290: Bug in TreeBrowser with TOC when no headers are present for TOC

pencil
Priority: Normal
Current State: Needs Developer
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: TreeBrowserPlugin
Branches:
Reported By: VickiBrown
Waiting For:
Last Change By: BaseUserMapping_333
I Like to set up folding tables of contents like this:

%TREEBROWSER{"thread" title="*Contents*"}%
%TOC{}%

There's a bug that appears if the page doesn't actually have any section headers that are allowed to show in the TOC.

Example: With this code:
---+!!  %SPACEOUT{ "%TOPIC%" }%
 
%TREEBROWSER{"thread" title="*Contents*"}%
%TOC{}%

---++!! %FORMFIELD{"Temperament"}%
---+!! %FORMFIELD{"Suit"}%

| *Temperament* | A |
| *Suit* | B |
| *Color* | Green |
| *Alternate Names* | X, Y, Z |

TreeBrowser decides to use the TABLE as its data.

  • screenshot:
    Item13290screenshot1.png

If I include a single header to work with, the problem goes away.

---+!!  %SPACEOUT{ "%TOPIC%" }%
 
%TREEBROWSER{"thread" title="*Contents*"}%
%TOC{}%

---++!! %FORMFIELD{"Temperament"}%
---+!! %FORMFIELD{"Suit"}%

| *Temperament* | A |
| *Suit* | B |
| *Color* | Green |
| *Alternate Names* | X, Y, Z |


---++ Header

  • screenshot:
    Item13290screenshot2.png

I could almost understand this behaviour if there were a bullet list somewhere on the page.

However
  • There are multiple blank lines after the code immediately following TREEBROWSER.
    It should stop looking for a list at the first blank line.

  • There are no lists anywhere on the page. TREEBROWSER is supposed to operate on bullet (or numbered) lists.

  • That's a table. TREEBROWSER is not supposed to operate on tables.

  • It's operating on the rendered HTML of the table. That's just weird.

-- VickiBrown - 05 Mar 2015

 

ItemTemplate edit

Summary Bug in TreeBrowser with TOC when no headers are present for TOC
ReportedBy VickiBrown
Codebase 1.1.9
SVN Range
AppliesTo Extension
Component TreeBrowserPlugin
Priority Normal
CurrentState Needs Developer
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r2 - 03 Jun 2017, AdminUser
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy