SID-01816: TWISTY Stopped Working in 5.1.4
| Status: |
Answered |
TWiki version: |
5.1.4 |
Perl version: |
5.10.1 |
| Category: |
TwistyPlugin |
Server OS: |
RHEL 6.1 |
Last update: |
12 years ago |
I have a TWiki running 4.1.2 that's working perfectly. I created a new 5.1.4 site and copied over a TWiki web from the old server to the new server. Most things work fine.
One thing that's no longer working is the TWISTY plugin. I'm using the 2013-02-16, $Rev: 25099 version that comes with TWiki 5.1.4.
The following code:
%TWISTY{showlink="Table of Contents..." hidelink="Hide"}%
%TOC%
%ENDTWISTY%
no longer hides the table of contents. Clicking on "Table of Contents" changes the label to "Hide", and vice versa. However, the table of contents itself is always displayed. In TWiki 4.1.2 the same code in the same page works correctly.
In googling this error I see various discussions that look similar to this problem but
they were all solved a while ago.
Any suggestions?
Jon Forrest
--
Jon Forrest - 2013-11-04
Discussion and Answer
You likely need to add
mode="div" to the TWISTY because TOC is a block element.
--
Peter Thoeny - 2013-11-04
Yes!! That was it. I wonder why this worked in 4.1.3.
Should this change be added to the TWISTY extension so that I won't have to manually edit each call?
Thank you very much!
--
Jon Forrest - 2013-11-04
The default
mode="span" is needed for non-block elements. Ideally the plugin is enhanced to detect the mode.
--
Peter Thoeny - 2013-11-04
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.