[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 --- Comment #10 from Lord_Farin lord_fa...@proofwiki.org --- Having a need for nested tag use, I've already implemented an according patch in the DOM preprocessor. Accordingly, I've decided to try and follow up on your suggestion: I wonder if it would just make sense to call formatHeadings some point after unstripGeneral. I don't think anyone is really using general strip markers to hide headings from the TOC. (This thought is just an initial reaction. Would need to do more research to see if that's remotely sane). I've just tried it, and it works -- the sections now appear in the ToC. This ties in with my observation that there is no actual use for the $isMain parameter to formatHeadings (the function just shouldn't be called if this parameter is false). It also makes sense conceptually to create a ToC only after the content (or at least, the structure) of the entire page has been determined (but of course, before nowiki strip markers are replaced), and as such, it needn't be processed by recursiveTagParse/internalParse; a call in the main parse routine suffices. My attempt added the formatHeadings call directly after unstripGeneral. Some testing does reveal, however, that moving the formatHeadings call spoils the edit section links (PHPUnit tests show that they do not get rendered any more). This needs to be dealt with, but for our wiki it is not a problem since section-wise editing is discouraged anyway. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 --- Comment #9 from Bawolff (Brian Wolff) bawolff...@gmail.com --- Created attachment 13111 -- https://bugzilla.wikimedia.org/attachment.cgi?id=13111action=edit Modified version of minimal example that works around the issue. Logically speaking, I would expect that $parserrecursiveTagParse to create headings like normal. On the other hand, that would probably screw things up with edit section links, if treated precisely as normal. You can kind of work around this issue by making the headers you create be the actual html tags, and everything else you do be manually made strip items. (The section edit links seem to get borked with nested uses of the tag, but nested tag uses don't work anyways since the first closing tag closes the outer nesting, and not the inner nesting, so that's probably not that big a deal (So if what you want to do, is suround the section and all its contents in an extension tag, you may be out of luck for an entirely other reason). You could maybe partially work around the nestedness issue by regexing it out, and not passing all of it to recursiveTagParse. Anyhow, see attachment for crappy work around (To be clear, I still think this is definitely a bug, just showing one way to work around it). --- To create a designated third unstrip type e.g. entitled sections (the first two being nowiki and general, defined and used in StripState.php), which is called before determining TOC, expanding those UNIQ markers whose content may hide sections. Upon creation of a new extension, one can indicate whether or not it may contain new sections using a flag I wonder if it would just make sense to call formatHeadings some point after unstripGeneral. I don't think anyone is really using general strip markers to hide headings from the TOC. (This thought is just an initial reaction. Would need to do more research to see if that's remotely sane). -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 Andre Klapper aklap...@wikimedia.org changed: What|Removed |Added Priority|Low |Normal Version|unspecified |1.22-git Severity|normal |enhancement -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 --- Comment #8 from Lord_Farin lord_fa...@proofwiki.org --- I've done further testing. There are two relevant conclusions: 1: Running formatHeadings with $isMain set to false is completely superfluous as far as I've been able to determine (using the shipped PHPUnit tests). If this is tested and investigated further, it can improve page load times (expensive but useless preg_match() calls are applied on the entire wiki page). 2: The sections that do not show up in TOC are hidden by a UNIQ identifier for the extension tag, which is not resolved until $this-mStripState-unstripGeneral() is called from the main parse() -- which is way after the TOC is determined using the main call to formatHeadings() in internalParse(). This state of affairs (which I suspect to tie in with the problems concerning section editing and templates) naturally means that some unstripping should be done before TOC is generated. Therefore, my proposal is as follows: To create a designated third unstrip type e.g. entitled sections (the first two being nowiki and general, defined and used in StripState.php), which is called before determining TOC, expanding those UNIQ markers whose content may hide sections. Upon creation of a new extension, one can indicate whether or not it may contain new sections using a flag. This course of action occurs to me as the least intrusive way to resolve this bug (and hopefully, related ones). Thoughts are welcomed. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 Bartosz Dziewoński matma@gmail.com changed: What|Removed |Added CC||matma@gmail.com -- You are receiving this mail because: You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 --- Comment #5 from Lord_Farin lord_fa...@proofwiki.org --- Is there anything else that I can do to speed up the debugging process? The issue is reasonably urgent to ProofWiki because it limits the deployment of the extension, which is critical for proper execution of some long-overdue maintenance projects. (This may be considered a bump.) -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 Marcin Cieślak marcin.cies...@gmail.com changed: What|Removed |Added CC||gwi...@wikimedia.org, ||suma...@wikimedia.org, ||tstarl...@wikimedia.org --- Comment #6 from Marcin Cieślak marcin.cies...@gmail.com --- I am not sure. Given your pretty deep analysis I think it requires attention from somebody much better versed in parser code. I've seen similar issues with counting sections for a longer time, so I am not sure if this is something easy to fix without breaking some other ways to handle wikitext; I guess it is also not a recent breakage (feel free to try if it ever worked properly :/). -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 jeremyb bugzilla+org.wikime...@tuxmachine.com changed: What|Removed |Added Attachment #11843|application/octet-stream|text/plain mime type|| -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 Andre Klapper aklap...@wikimedia.org changed: What|Removed |Added Priority|Unprioritized |Low CC||aklap...@wikimedia.org --- Comment #1 from Andre Klapper aklap...@wikimedia.org --- Hi, without a minimal testcase it's hard to debug or to find out if there is a bug in the MediaWiki codebase, or in your extension. Also, against which MediaWiki version do you try this? -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 --- Comment #2 from lord_fa...@proofwiki.org --- Created attachment 11843 -- https://bugzilla.wikimedia.org/attachment.cgi?id=11843action=edit Code used for the tag extension The literal PHP code used, for debugging purposes -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 --- Comment #3 from lord_fa...@proofwiki.org --- Created attachment 11844 -- https://bugzilla.wikimedia.org/attachment.cgi?id=11844action=edit Minimal example exhibiting the issue -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 --- Comment #4 from lord_fa...@proofwiki.org --- The MediaWiki version used is the latest, 1.20.2. In addition to the minimal example I added as an attachment, a live example is at http://www.proofwiki.org/wiki/User:Lord_Farin/Sandbox/Help:Wiki_Editing. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
[Bug 45317] Sections generated by tag extension do not show up in TOC
https://bugzilla.wikimedia.org/show_bug.cgi?id=45317 Marcin Cieślak marcin.cies...@gmail.com changed: What|Removed |Added CC||marcin.cies...@gmail.com -- You are receiving this mail because: You are watching all bug changes. ___ Wikibugs-l mailing list Wikibugs-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikibugs-l