Loading...
 
Skip to main content

Out-of-order headers/titles break following headers in tables of contents (autotoc) - Some headers may be missing

Status
Open
Subject
Out-of-order headers/titles break following headers in tables of contents (autotoc) - Some headers may be missing
Version
15.x
15.x Regression
18.x
Category
  • Bug
Feature
Auto TOC
Resolution status
New
Submitted by
Philippe Cloutier
Lastmod by
Philippe Cloutier
Rating
(0)
Description

If some level y header follows a level x header, y is normally between 1 and x+1. But Tiki also supports going straight to x+2 or greater, in general. For tables of contents, this is not a problem for server-side TOC-s (maketoc), but it is one for client-side TOC-s (autoToc). Level i headers which follow the excessively deep header are displayed as level i-1 headers. And level 1 headers are not displayed. Furthermore, headers following a missing level 1 header are also missing, no matter their level.

So, for example, if a page contains:

Copy to clipboard
! Title 1 !!! Title 3 (too deep) !! Title 2 ! Title 1 !! Title 2

... the client-side TOC would list the first title fine, the third one would be displayed as H1, and the fourth and fifth titles would not display.

This appeared with Tiki 15, when autoToc switched to Bootstrap Scrollspy. Tiki 14.4 does not have this problem. This persists in Tiki 18.1.

The defect must be in autoToc.js. The technical bug causes another symptom reported in REMARKSBOX breaks 'Automatic table of contents'.

Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
6710
Created
Thursday 28 June, 2018 22:00:21 UTC
by Philippe Cloutier
LastModif
Thursday 28 June, 2018 22:00:21 UTC


Show PHP error messages