Headings in included pages end collapsible sections in parent page
- Status
- Open
- Subject
- Headings in included pages end collapsible sections in parent page
- Category
- Regression
- Feature
- Wiki Syntax (text area, parser, external wiki, etc)
- Resolution status
- New
- Submitted by
- Philippe Cloutier
- Lastmod by
- Philippe Cloutier
- Rating
- Description
Since Tiki 19, a collapsible section (generated with a heading that starts with a minus or plus sign, as documented
For example, if page Parent has
) effectively ends at the first heading of the same level or above in the pages it includes (with the INCLUDE plugin).
this codeCopy to clipboard!Section 1 Direct content !+Collapsed section Direct content {include page="Help"} ! Last section Direct content
...while page Help hasthe following sourceCopy to clipboard!For Support Please Contact support@company.com (555) 123-4567...then the "For Support Please Contact" section always shows, regardless of the toggle control's state. Clicking on "+" only reveals "Direct content".
I am categorizing this ticket in Bug::Regression because this is a regression, but this is arguably not a bug.This issue is a regression from r66644
and therefore affects Tiki 19. That commit essentially reverted r48937
(2013-12-03, on the Tiki 12 branch), so Tiki 11 and before also have the same issue.
Note that this is the second back-and-forth on this, after r29321
was reverted by r33993
.- Solution
Tiki never had any code to deal with this issue. Versions 12 to 18 were not affected by chance. Relevant code is in parse_data_process_maketoc(),
around line 2598and thenCopy to clipboard$aclose = '<a id="flipper' . $thisid . '" class="link" href="#" onclick="flipWithSign(\'' . $thisid . '\');return false;">[' . ($divstate == '-' ? '+' : '-') . ']</a>'; $aclose2 = '<div id="' . $thisid . '" class="showhide_heading" style="display:' . ($divstate == '+' ? 'block' : 'none') . ';">'; $headerlib = TikiLib::lib('header'); $headerlib->add_jq_onready("setheadingstate('$thisid');"); array_unshift($divdepth, $hdrlevel);around line 2568Copy to clipboard// Close lower level divs if opened for (; current($divdepth) >= $hdrlevel; array_shift($divdepth)) { $data .= '</div>'; }- Workaround
- Enabling the INCLUDE plugin's parse_included_page parameter avoids this issue.
- Importance
- 3
- Easy to solve?
- 1 difficult
- Priority
- 3
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 6992
- Created
- Tuesday 08 January, 2019 20:03:11 UTC
by Philippe Cloutier - LastModif
- Friday 11 January, 2019 17:44:54 UTC