Page MenuHomePhabricator

When Cargo query is run on a page TOC disappears
Closed, ResolvedPublic

Description

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.

Original bug report: https://phabricator.miraheze.org/T7028

MediaWiki: 1.35.1
PHP: 7.3.27-1~deb10u1 (fpm-fcgi)
MariaDB: 10.4.15-MariaDB-1:10.4.15+maria~buster-log

Event Timeline

Restricted Application added subscribers: RhinosF1, Universal_Omega, Aklapper. · View Herald Transcript

There's a duplicate task here (T307735). Their issue may be resolved?

Ah, apologies, I didn’t view the original report. I see it happens only when TOC is auto-generated my Mediawiki, and problem disappears when TOC is positioned with TOC or FORCETOC.

Still occurring on:
MediaWiki 1.38.1 (ede16c4)
PHP 7.4.28 (fpm-fcgi)
MariaDB 10.5.16-MariaDB-1:10.5.16+maria~bullseye-log
Cargo: 3.2 (876d2fa)

Change 813632 had a related patch set uploaded (by TK-999; author: TK-999):

[mediawiki/extensions/Cargo@master] Bring back table of contents on pages with Cargo queries

https://gerrit.wikimedia.org/r/813632

Change 813324 had a related patch set uploaded (by Yaron Koren; author: Yaron Koren):

[mediawiki/extensions/Cargo@master] Partial revert of 197438ad7fe8 - remove NOTOC from query results

https://gerrit.wikimedia.org/r/813324

Change 813324 merged by jenkins-bot:

[mediawiki/extensions/Cargo@master] Partial revert of 197438ad7fe8 - remove NOTOC from query results

https://gerrit.wikimedia.org/r/813324

Yaron_Koren claimed this task.
Yaron_Koren subscribed.

Sorry about this problem, and the long delay on fixing it.

Change 813632 abandoned by Yaron Koren:

[mediawiki/extensions/Cargo@master] Bring back table of contents on pages with Cargo queries

Reason:

Removes too much.

https://gerrit.wikimedia.org/r/813632