Loading...
 

Tracker Item History


Version Date User Field ID Field Difference
19 25 Apr 19 18:26 GMT-0000 Philippe Cloutier 27 Description
 This issue happens because maketoc therefore causes a plugin call's result to be repeated in the TOC (instead of possibly executed again specifically for TOC-s), which has 2 problems: This issue happens because maketoc therefore causes a plugin call's result to be repeated in the TOC (instead of possibly executed again specifically for TOC-s), which has 2 problems:
-* plugins don't expect their output included twice in the page, so (such as ANAME) may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML +* plugins don't expect their output included twice in the page, so some (such as ANAME) may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML
 * plugins don't expect their output to be included in an HTML A element, so some (such as FOOTNOTE) for example generate links themselves, again causing invalid HTML * plugins don't expect their output to be included in an HTML A element, so some (such as FOOTNOTE) for example generate links themselves, again causing invalid HTML
18 20 Jul 18 20:23 GMT-0000 Philippe Cloutier 28 Solution
 The very same patch works verbatim against Tiki 15 too. The very same patch works verbatim against Tiki 15 too.
-This is very much of a hack and may very well cause regressions. This also depends on PHP's DOM extension. The """"Dependency on PHP's DOM extension"""" thread started 2018-07-13 on tikiwiki-devel proposes adding the DOM extension to dependencies. Otherwise, the whole addition can be wrapped in a if conditional to the extension's presence. +This is very much of a hack and may very well cause regressions.
17 13 Jul 18 15:19 GMT-0000 Philippe Cloutier 28 Solution
 Unfortunately, in order to do that, we need to distinguish headings before plugins are called. As of r66644, plugins are called (in parse_first()) well before headings are distinguished (in parse_data_process_maketoc()). Unfortunately, in order to do that, we need to distinguish headings before plugins are called. As of r66644, plugins are called (in parse_first()) well before headings are distinguished (in parse_data_process_maketoc()).
-The following draft code, based on PHP's DOM extension, could be used to build a solution:{CODE(colors=""""php"""" theme=""""default"""")}$dom = new DOMDocument();$dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);$footnote = $dom->getElementById('ref_footnote1');$dom->removeChild($footnote);$title = $dom->saveHTML();{CODE}‌Initially, ‌‌~np~$noparsed['data'][0]~/np~ contains:~pp~‌<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""ref_footnote1"""" href=""""#footnote1"""" class=""""footlink """">1</a><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote"""" ></span></a>~/pp~At the end, $title contains:~pp~<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a>~/pp~ +! Dirty hackThe 2 patches attached provide a dirty solution which seems to work well on UTF-8 databases. These would need validation for compatibility with other encodings before being integrated.
-$noparsed can be searched as is done in the """"if (!$contains_block)"""". This unfortunately will not work on the full TOC going into each list item (title) if it is used with invalid HTML, because loadHTML() results in a valid DOM different from that which is needed. +The very same patch works verbatim against Tiki 15 too.This is very much of a hack and may very well cause regressions. This also depends on PHP's DOM extension. The """"Dependency on PHP's DOM extension"""" thread started 2018-07-13 on tikiwiki-devel proposes adding the DOM extension to dependencies. Otherwise, the whole addition can be wrapped in a if conditional to the extension's presence.
16 10 Jul 18 16:08 GMT-0000 Philippe Cloutier 28 Solution
 ~pp~<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a>~/pp~ ~pp~<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a>~/pp~
-$noparsed can be searched as is done in the """"if (!$contains_block)"""". +$noparsed can be searched as is done in the """"if (!$contains_block)"""". This unfortunately will not work on the full TOC going into each list item (title) if it is used with invalid HTML, because loadHTML() results in a valid DOM different from that which is needed.
15 09 Jul 18 19:10 GMT-0000 Philippe Cloutier 28 Solution
 {CODE}‌ {CODE}‌
 Initially, ‌‌~np~$noparsed['data'][0]~/np~ contains: Initially, ‌‌~np~$noparsed['data'][0]~/np~ contains:
-‌<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""ref_footnote1"""" href=""""#footnote1"""" class=""""footlink """">1</a><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote"""" ></span></a> +~pp~‌<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""ref_footnote1"""" href=""""#footnote1"""" class=""""footlink """">1</a><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote"""" ></span></a>~/pp~
 At the end, $title contains: At the end, $title contains:
-<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a> +~pp~<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a>~/pp~
 $noparsed can be searched as is done in the """"if (!$contains_block)"""". $noparsed can be searched as is done in the """"if (!$contains_block)"""".
14 05 Jul 18 17:50 GMT-0000 Philippe Cloutier 28 Solution
 The following draft code, based on PHP's DOM extension, could be used to build a solution: The following draft code, based on PHP's DOM extension, could be used to build a solution:
-{CODE(colors=""""php"""" theme=""""default"""")}‌‌ +{CODE(colors=""""php"""" theme=""""default"""")}
 $dom = new DOMDocument(); $dom = new DOMDocument();
 $dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
 At the end, $title contains: At the end, $title contains:
 <!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a> <!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a>
 +$noparsed can be searched as is done in the """"if (!$contains_block)"""".
13 05 Jul 18 17:25 GMT-0000 Philippe Cloutier 28 Solution
 $dom = new DOMDocument(); $dom = new DOMDocument();
 $dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
-$footnote = $dom->getElementById('ref_footnote1');‌‌‌ +$footnote = $dom->getElementById('ref_footnote1');
 $dom->removeChild($footnote); $dom->removeChild($footnote);
-$title = ‌‌$dom->saveHTML(); +$title = $dom->saveHTML();
 {CODE}‌ {CODE}‌
 Initially, ‌‌~np~$noparsed['data'][0]~/np~ contains: Initially, ‌‌~np~$noparsed['data'][0]~/np~ contains:
12 05 Jul 18 17:23 GMT-0000 Philippe Cloutier 28 Solution
 {CODE(colors=""""php"""" theme=""""default"""")}‌‌ {CODE(colors=""""php"""" theme=""""default"""")}‌‌
 $dom = new DOMDocument(); $dom = new DOMDocument();
-‌‌$dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);‌‌$footnote = $dom->getElementById('ref_footnote1');‌‌‌$dom->removeChild($footnote); +$dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);$footnote = $dom->getElementById('ref_footnote1');‌‌‌$dom->removeChild($footnote);
 $title = ‌‌$dom->saveHTML(); $title = ‌‌$dom->saveHTML();
 {CODE}‌ {CODE}‌
11 05 Jul 18 17:23 GMT-0000 Philippe Cloutier 28 Solution
 $title = ‌‌$dom->saveHTML(); $title = ‌‌$dom->saveHTML();
 {CODE}‌ {CODE}‌
-Initially, ‌‌$noparsed['data'][0] contains: +Initially, ‌‌~np~$noparsed['data'][0]~/np~ contains:
 ‌<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""ref_footnote1"""" href=""""#footnote1"""" class=""""footlink """">1</a> ‌<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""ref_footnote1"""" href=""""#footnote1"""" class=""""footlink """">1</a>
 <!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote"""" ></span></a> <!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote"""" ></span></a>
 At the end, $title contains: At the end, $title contains:
 <!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a> <!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a>
10 05 Jul 18 17:21 GMT-0000 Philippe Cloutier 28 Solution
 Unfortunately, in order to do that, we need to distinguish headings before plugins are called. As of r66644, plugins are called (in parse_first()) well before headings are distinguished (in parse_data_process_maketoc()). Unfortunately, in order to do that, we need to distinguish headings before plugins are called. As of r66644, plugins are called (in parse_first()) well before headings are distinguished (in parse_data_process_maketoc()).
 +The following draft code, based on PHP's DOM extension, could be used to build a solution:
 +{CODE(colors=""""php"""" theme=""""default"""")}‌‌
 +$dom = new DOMDocument();
 +‌‌$dom->loadHTML($noparsed['data'][0], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
 +‌‌$footnote = $dom->getElementById('ref_footnote1');
 +‌‌‌$dom->removeChild($footnote);
 +$title = ‌‌$dom->saveHTML();
 +{CODE}‌
 +Initially, ‌‌$noparsed['data'][0] contains:
 +‌<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""ref_footnote1"""" href=""""#footnote1"""" class=""""footlink """">1</a>
 +<!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote"""" ></span></a>
 +At the end, $title contains:
 +<!-- TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><!-- /TPL: templates\wiki-plugins\wikiplugin_footnote.tpl --><a id=""""plugin-edit-footnote1"""" href=""""ja<x>vascript:void(1)"""" class=""""editplugin"""" style=""""display:none;""""><span class=""""icon icon-plugin fa fa-puzzle-piece fa-fw tips"""" title=""""Edit plugin:Footnote""""></span></a>
9 04 Jul 18 16:42 GMT-0000 Philippe Cloutier 27 Description
 ! Cause ! Cause
-Plugins are called in parse_first(). Calls to plugins in """"html"""" format are replaced by alphanumeric fingerprints. After, parse_data_process_maketoc() is called and expands """"~np~{maketoc}~/np~"""" to headings, so that each plugin call in a heading in the TOC has its fingerprint twice in the source. After, replace_preparse() replaces fingerprints with the result of plugin functions (stored during parse_first's execution). +Plugin calls are executed in parse_first(). (Calls to plugins in """"html"""" format are replaced by alphanumeric fingerprints.) After, parse_data_process_maketoc() is called and expands """"~np~{maketoc}~/np~"""" to headings, so that each plugin call in a heading in the TOC has its result (or fingerprint) twice in the source. (After, replace_preparse() replaces fingerprints with the result of plugin functions (stored during parse_first's execution).)
-This happens because maketoc causes a plugin call's result to be repeated in the TOC, which has 2 problems:* plugins don't expect their output included twice in the page, so they may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML* plugins don't expect their output to be included in an HTML A element, so they may for example generate links themselves, again causing invalid HTML +This issue happens because maketoc therefore causes a plugin call's result to be repeated in the TOC (instead of possibly executed again specifically for TOC-s), which has 2 problems:* plugins don't expect their output included twice in the page, so (such as ANAME) may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML* plugins don't expect their output to be included in an HTML A element, so some (such as FOOTNOTE) for example generate links themselves, again causing invalid HTML
8 04 Jul 18 16:26 GMT-0000 Philippe Cloutier 27 Description
 ! Cause ! Cause
-Plugins are called in parse_first() and calls are replaced by alphanumeric fingerprints. After, parse_data_process_maketoc() is called and expands """"~np~{maketoc}~/np~"""" to headings, so that each plugin call in a heading in the TOC has its fingerprint twice in the source. After, replace_preparse() replaces fingerprints with the result of plugin functions (stored during parse_first's execution). +Plugins are called in parse_first(). Calls to plugins in """"html"""" format are replaced by alphanumeric fingerprints. After, parse_data_process_maketoc() is called and expands """"~np~{maketoc}~/np~"""" to headings, so that each plugin call in a heading in the TOC has its fingerprint twice in the source. After, replace_preparse() replaces fingerprints with the result of plugin functions (stored during parse_first's execution).
 This happens because maketoc causes a plugin call's result to be repeated in the TOC, which has 2 problems: This happens because maketoc causes a plugin call's result to be repeated in the TOC, which has 2 problems:
 * plugins don't expect their output included twice in the page, so they may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML * plugins don't expect their output included twice in the page, so they may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML
-* plugins don't expect their output to be included in an HTML A element, so they may for example generate links themselves, causing invalid HTML +* plugins don't expect their output to be included in an HTML A element, so they may for example generate links themselves, again causing invalid HTML
7 13 Jun 18 16:13 GMT-0000 Philippe Cloutier 28 Solution
 wikiplugin_foo_info() could return an extra """"headings"""" array element indicating what to do if the plugin is called in a heading. For SUP, this could be """"'headings' => 'same'"""". For the GOOGLEANALYTICS plugin, the value could be """"ignore"""". {sign user=""""Chealer9"""" datetime=""""2018-06-08T22:10:02+00:00""""} wikiplugin_foo_info() could return an extra """"headings"""" array element indicating what to do if the plugin is called in a heading. For SUP, this could be """"'headings' => 'same'"""". For the GOOGLEANALYTICS plugin, the value could be """"ignore"""". {sign user=""""Chealer9"""" datetime=""""2018-06-08T22:10:02+00:00""""}
 +Unfortunately, in order to do that, we need to distinguish headings before plugins are called. As of r66644, plugins are called (in parse_first()) well before headings are distinguished (in parse_data_process_maketoc()).
      101 Easy to solve?
- +2
6 11 Jun 18 14:33 GMT-0000 Philippe Cloutier 27 Description
 I have a couple of test pages which illustrate this issue, if they are of any use in your testing. I have a couple of test pages which illustrate this issue, if they are of any use in your testing.
 +! Effect on FOOTNOTE
 +Calling FOOTNOTE returns an HTML A element with an id, so using that same identifier twice causes invalid HTML. Additionally, since browsers favor the first element using the identifier in such cases, the TOC's instance wins if ~np~{maketoc}~/np~ precedes headings, which is not what we want.
 ! Cause ! Cause
-Plugins are called in parse_first() and calls are replaced by alphanumeric fingerprints, before parse_data_process_maketoc() is called. After, replace_preparse() replaces fingerprints with the result of plugin functions (stored during parse_first's execution). +Plugins are called in parse_first() and calls are replaced by alphanumeric fingerprints. After, parse_data_process_maketoc() is called and expands """"~np~{maketoc}~/np~"""" to headings, so that each plugin call in a heading in the TOC has its fingerprint twice in the source. After, replace_preparse() replaces fingerprints with the result of plugin functions (stored during parse_first's execution).
 This happens because maketoc causes a plugin call's result to be repeated in the TOC, which has 2 problems: This happens because maketoc causes a plugin call's result to be repeated in the TOC, which has 2 problems:
 * plugins don't expect their output included twice in the page, so they may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML * plugins don't expect their output included twice in the page, so they may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML
 * plugins don't expect their output to be included in an HTML A element, so they may for example generate links themselves, causing invalid HTML * plugins don't expect their output to be included in an HTML A element, so they may for example generate links themselves, causing invalid HTML
5 11 Jun 18 14:08 GMT-0000 Philippe Cloutier 27 Description
 +Calling plugins in headings in pages where maketoc is used can cause breakage. For example, this happens when calling the ANAME or FOOTNOTE plugins.
 ! Effect on ANAME ! Effect on ANAME
-{QUOTE(replyto=""""Martin"""")}Although Tiki generates anchors for all headings automatically, I find using ANAME is a great way of creating manageable and easily memorable Anchors for otherwise unwieldy headings +Although Tiki generates anchors for all headings automatically, I find using ANAME is a great way of creating manageable and easily memorable Anchors for otherwise unwieldy headings
 If a heading within a tiki page is coded as follows If a heading within a tiki page is coded as follows
 {CODE(caption=""""1. Tiki Source Code snippet"""" wrap=1)} {CODE(caption=""""1. Tiki Source Code snippet"""" wrap=1)}
 !! Fourth and Even More Forgetful Heading{ANAME()}Quick4{ANAME} !! Fourth and Even More Forgetful Heading{ANAME()}Quick4{ANAME}
-{CODE}then Tiki generates the following HMTL code +{CODE}then Tiki generates the following HTML code
 {CODE(caption=""""2. Generated HTML snippet"""" wrap=1)} {CODE(caption=""""2. Generated HTML snippet"""" wrap=1)}
 <h3 class=""""showhide_heading"""" id=""""Fourth_and_Even_More_Forgetful_Heading""""> Fourth and Even More Forgetful Heading<a id=""""Quick4""""></a></h3> <h3 class=""""showhide_heading"""" id=""""Fourth_and_Even_More_Forgetful_Heading""""> Fourth and Even More Forgetful Heading<a id=""""Quick4""""></a></h3>
 If the MAKETOC plugin is included below the ANAME, then the ANAME works as intended, since that is the first occurrence of the generated HTML ANCHOR statement. If the MAKETOC plugin is included below the ANAME, then the ANAME works as intended, since that is the first occurrence of the generated HTML ANCHOR statement.
-I have a couple of test pages which illustrate this issue, if they are of any use in your testing.{QUOTE} +I have a couple of test pages which illustrate this issue, if they are of any use in your testing.
 ! Cause ! Cause
4 08 Jun 18 22:10 GMT-0000 Philippe Cloutier 26 Subject
-MAKETOC re-interprets plugin calls (such as calls to ANAME) in headings +Tables of Contents (maketoc) can be broken when headings call plugins (such as ANAME and FOOTNOTE)
      27 Description
-Although Tiki generates anchors for all headings automatically, I find using ANAME is a great way of creating manageable and easily memorable Anchors for otherwise unwieldy headings +! Effect on ANAME{QUOTE(replyto=""""Martin"""")}Although Tiki generates anchors for all headings automatically, I find using ANAME is a great way of creating manageable and easily memorable Anchors for otherwise unwieldy headings
 If a heading within a tiki page is coded as follows If a heading within a tiki page is coded as follows
 {CODE(caption=""""1. Tiki Source Code snippet"""" wrap=1)} {CODE(caption=""""1. Tiki Source Code snippet"""" wrap=1)}
 If the MAKETOC plugin is included below the ANAME, then the ANAME works as intended, since that is the first occurrence of the generated HTML ANCHOR statement. If the MAKETOC plugin is included below the ANAME, then the ANAME works as intended, since that is the first occurrence of the generated HTML ANCHOR statement.
-I have a couple of test pages which illustrate this issue, if they are of any use in your testing. +I have a couple of test pages which illustrate this issue, if they are of any use in your testing.{QUOTE}
-Martin +! CausePlugins are called in parse_first() and calls are replaced by alphanumeric fingerprints, before parse_data_process_maketoc() is called. After, replace_preparse() replaces fingerprints with the result of plugin functions (stored during parse_first's execution).This happens because maketoc causes a plugin call's result to be repeated in the TOC, which has 2 problems:* plugins don't expect their output included twice in the page, so they may use HTML's id attribute in a manner incompatible with maketoc, causing invalid HTML* plugins don't expect their output to be included in an HTML A element, so they may for example generate links themselves, causing invalid HTML
      28 Solution
 +I believe there is no general solution to this. Each plugin needs to adapt its behavior when the output is to be used in a heading. For example, SUP can return the same thing, but ANAME should return nothing.
 +A solution could be implemented by potentially calling a plugin function twice per in-heading plugin call. With an extra parameter indicating a call for a TOC, FOOTNOTE could return just text, no link. However, if there are 2 independent calls, it would be hard for FOOTNOTE to know that it should return the same number.
 +wikiplugin_foo_info() could return an extra """"headings"""" array element indicating what to do if the plugin is called in a heading. For SUP, this could be """"'headings' => 'same'"""". For the GOOGLEANALYTICS plugin, the value could be """"ignore"""". {sign user=""""Chealer9"""" datetime=""""2018-06-08T22:10:02+00:00""""}
3 08 Jun 18 18:49 GMT-0000 Philippe Cloutier 90 Workaround
- +For ANAME, put the call on the line before or after the heading
2 08 May 18 17:16 GMT-0000 Philippe Cloutier 32 Feature
-Wiki Plugin (extends basic syntax) +Wiki Plugin (extends basic syntax) Wiki Syntax (text area, parser, external wiki, etc)
1 08 May 18 17:10 GMT-0000 Philippe Cloutier 26 Subject
-MAKETOC breaks ANAME v6.7 +MAKETOC re-interprets plugin calls (such as calls to ANAME) in headings
      43 Category
-Conflict of two features (each works well independently) Error +Conflict of two features (each works well independently)
      47 Version
 +12.x
 +14.x
 +15.x
 +18.x
 6.x 6.x
      55 Lastmod by
- +Philippe Cloutier
      56 Resolution status
- +Confirmed

Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Diagram
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw -superseded by Diagram
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Gantt
Group
Groupmail
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools