Page MenuHomePhabricator

WikidataPageBanner breaks Vector page subtitle
Closed, ResolvedPublic

Description

I've noticed this on test2.wikipedia.org where the extension was enabled.

capture3.png (1×1 px, 303 KB)
capture.png (1×1 px, 317 KB)
capture4.png (766×888 px, 99 KB)
capture2.png (1×2 px, 373 KB)

The subtitle is meant to be inside a div#contentSub element, which is styled with a grey text color and a smaller font-size.

However, on wikis where WikidataPageBanner is enabled the subtitle is absent, and its contents are instead output inside a custom div.ext-wpb-pagebanner-subtitle element, which is missing the correct positioning and styling.

Traced it down to the following code:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jdlrobson added a project: User-Jdlrobson.
Jdlrobson subscribed.

This feels like an incorrectly configured WikidataPageBanner setup. Will look at setup on test wiki shortly.

I see 2 options here

  1. Only do the subtitle fix when a banner exists (e.g. add `&& banner``` to https://gerrit.wikimedia.org/g/mediawiki/extensions/WikidataPageBanner/+/7d39c374cc589d9ecd714976d5508ca5f6b133c9/includes/WikidataPageBanner.hooks.php#62)
  2. We disable the extension on test2 wiki

Will happily merge a patch for 1. Right now I am the only active maintainer of the extension and not wanting to self merge I can't submit a patch for 1.

Change 452004 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/WikidataPageBanner@master] Only move/restyle subtitle for pages where banner is present

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

^ takes care of it, but as I'm the only maintainer I'm not sure if it will ever get reviewed :)

Change 452004 merged by jenkins-bot:
[mediawiki/extensions/WikidataPageBanner@master] Only move/restyle subtitle for pages where banner is present

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

Change 456757 had a related patch set uploaded (by Krinkle; owner: Jdlrobson):
[mediawiki/extensions/WikidataPageBanner@wmf/1.32.0-wmf.19] Only move/restyle subtitle for pages where banner is present

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

Change 456757 merged by jenkins-bot:
[mediawiki/extensions/WikidataPageBanner@wmf/1.32.0-wmf.19] Only move/restyle subtitle for pages where banner is present

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

Mentioned in SAL (#wikimedia-operations) [2018-08-31T23:00:34Z] <krinkle@deploy1001> Synchronized php-1.32.0-wmf.19/extensions/WikidataPageBanner/: I9dc9a4c1fb62c4 - T199855 (duration: 00m 51s)

Krinkle claimed this task.
Krinkle removed a project: Patch-For-Review.

Backported and verified on mwdebug and in prod.