Page MenuHomePhabricator

Mediawiki.org gadget: Wrong Auto-number headings when using __NOTOC__
Closed, InvalidPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • TOC is disabled there using NOTOC in the source, section numbering shows :
1 Software settings and robots.txt
    1.1 Software settings
    1.2 Robots.txt noindexing
2 NOINDEX magic word
    2.3 Individual pages
    2.4 Standard template noindexing
3 INDEX magic word
    3.5 Individual pages
    3.6 Current issues
4 Footnotes

What should have happened instead?:

  • notice that headers == follow logical numbering, -> ok
  • notice that headers === are cumulated, they do not restart from 1 each time we change the parent
  • notice that once TOC is reenabled (deleting the tag line), the section numbering is correct :
1 Software settings and robots.txt
    1.1 Software settings
    1.2 Robots.txt noindexing
2 NOINDEX magic word
    2.1 Individual pages
    2.2 Standard template noindexing
3 INDEX magic word
    3.1 Individual pages
    3.2 Current issues
4 Footnotes
  • so i ask section numbering to be realigned such as to display this last format and be independant from the presence of tag NOTOC

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.): Desktop + Vector skin.

Event Timeline

Hi @Wladek92, thanks for taking the time to report this!

User scripts, gadgets, templates, custom CSS are local on-wiki content. Local content is managed independently on each wiki, by each wiki community themselves.
Phabricator is mostly used for MediaWiki, MediaWiki extensions, or server configuration, or by developers and teams to organize what they plan to work on.
This needs fixing on the local wiki by editing its local content. Thus I am closing this task here - thanks for your understanding.
Please bring this up on https://www.mediawiki.org/wiki/Project:Village_Pump , the code is at https://www.mediawiki.org/wiki/MediaWiki:Gadget-autonum.js

Aklapper renamed this task from wrong Auto-number headings === when using __NOTOC__ to Mediawiki.org gadget: Wrong Auto-number headings when using __NOTOC__.Oct 5 2023, 10:53 AM

thanks - just done on Village Pump.