Page MenuHomePhabricator

Pagebanner should be compatible with new parser changes
Closed, ResolvedPublicBUG REPORT

Description

Extension WikidataPageBanner should suppress TOC on pages with the banner. This usual behavior has changed today, and the standard column-style TOC appears now even when banner is present. It affects all pages on English Wikivoyage, for example: https://en.wikivoyage.org/wiki/Prague

TOC should be switched off on pages with the banner. This can be achieved by adding the NOTOC keyword in the template that calls the banner. However, I am not sure if such a solution is really desirable, or something should be fixed inside the Mediawiki code instead.

Event Timeline

Jdlrobson added a subscriber: cscott.

@cscott I'm guessing this is fallout from the changes you were working on last week?

This can be achieved by adding the NOTOC keyword in the template that calls the banner. However, I am not sure if such a solution is really desirable, or something should be fixed inside the Mediawiki code instead.

Regardless of whether behaviour changed here, this does seem like the ideal solution here to me - I imagine some wikis may want both, or want only the table of contents in the sidebar.

@Jdlrobson unfortunately also in en:voy there's the need for some user to show/use the TOC, so it's necessary to solve the bug server-side, restoring the previous behavior.
Thanks for contacting @cscott or whomever could be involved on its resolution.

Change 1010334 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/WikidataPageBanner@master] Fix inversion error in `enable-toc` test

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

Patch was reverted as a temporary measure so this will ride the train this week.

Jdlrobson renamed this task from TOC appears on pages with Pagebanner to Pagebanner should be compatible with new parser changes.Mar 15 2024, 9:43 PM
Jdlrobson raised the priority of this task from Medium to Needs Triage.
Jdlrobson lowered the priority of this task from High to Medium.
Jdlrobson claimed this task.

Extension WikidataPageBanner should suppress TOC on pages with the banner.

In Vector 2022, the table of contents behaves differently and shows alongside the banner (as the table of contents is sticky and the banner is not). https://en.wikivoyage.org/wiki/Prague?useskin=vector&useparsoid=1
In legacy Vector, the table of contents appears to be supressed as expected https://en.wikivoyage.org/wiki/Prague?useskin=vector&useparsoid=1

This seems to be working as expected.

Change #1010334 abandoned by Jdlrobson:

[mediawiki/extensions/WikidataPageBanner@master] Fix inversion error in `enable-toc` test

Reason:

https://phabricator.wikimedia.org/T359446 is resolved so this shouldn't be needed. Please open a new ticket if it is.

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