Page MenuHomeMiraheze

Cargo TOC bug
Closed, InvalidPublic

Description

Bug : for some reason, when a Cargo query is run on a page, TOC simply disappears. On "Page Information" it shows the the page has the __NOTOC__ magic word, even though I never used this magic word on the page or in some template.
Initially I thought it was because my table had a non-ASCII character ("é"), but I recreated all the tables with accents (é -> e), and it's still happening.
The only workaround is to use __TOC__ or __FORCETOC__.

Steps to reproduce:

  1. Create a page with the minimum amount necessary to automatically render the TOC
  2. Query a table (before the first heading)
    • TOC does not render. If you inspect the page, is not even just hidden with some CSS setting.

Example pages:

  • Example 1 - Multiple headings, TOC does not render. If you remove the first template at the top of the page ({{poképrevnex}}) and preview, the TOC renders normally
  • Example 2 - Multiple headings, TOC does not render.
  • Example 3 - Just like Example 1, but I had to include manually the __TOC__ magic word. If you remove it, the TOC will not render.

I would recommend testing this on test3 before upstreaming it (especially because I don't know if my pages are the best example and they're not in English).

Event Timeline

Unknown Object (User) moved this task from Unsorted to Short Term on the Universal Omega board.Mar 24 2021, 22:05
Unknown Object (User) moved this task from Backlog to Short Term on the MediaWiki (SRE) board.
Unknown Object (User) changed the task status from Resolved to Invalid.Mar 25 2021, 06:35

Upstream = invalid in the past