Page MenuHomePhabricator

Erroneous [dismiss] button shown to all readers
Closed, ResolvedPublic

Description

Actual:
https://nl.wikipedia.beta.wmflabs.org/wiki/Hoofdpagina (default, logged-out, using vector-2022).

Screenshot 2022-01-26 at 04.26.42.png (562×2 px, 142 KB)

A [dismiss] button is displayed despite there being no actual site notice.

Expected:
No [hide] button.

When MediaWiki:Anonnotice is empty (aka a "blank" message), that means no site notice should be shown to logged-out users.

Its default is - in the software which means to display MediaWiki:Sitenotice for both logged-in and logged-out users. However, wikis often blank Anonnotice and then utilize Sitenotice for logged-in users only. When Anonnotice is disabled with - and Sitenotice is also blank or disabled, then no site notice is shown to anyone.

Event Timeline

Krinkle renamed this task from Vector 22 displays erroneous [hide] button for all readers to Erroneous [hide] button shown to all readers.Jan 26 2022, 4:33 AM

I mistakenly thought it was specific to Vector 22. Turns out it is there in the default version as well, but hard to see at:
https://nl.wikipedia.beta.wmflabs.org/wiki/Hoofdpagina?useskin=vector

Screenshot 2022-01-26 at 04.35.17.png (450×1 px, 77 KB)

.. due to a lack of float containment. That might be a separate bug, probably not a regression, just a cascading problem since any non-empty notice will result in at least 1 line of content in the notice area, and thus enough space reserved for [hide] to float along instead of geting obscured by the first box within the article content.

This task is specifically about the regression that the dismissable link gets added when it shouldn't.

It is working as expected in production at:
https://nl.wikipedia.org/wiki/Hoofdpagina (logged-out or use private browsing)

Hence likely to be something in the last few days of commits.

Krinkle renamed this task from Erroneous [hide] button shown to all readers to Erroneous [dismiss] button shown to all readers.Jan 26 2022, 5:25 AM
Krinkle updated the task description. (Show Details)

This is affecting mediawiki.org now as well, so I guess it's in the current train,
and will be affecting all wikis/skins/users tomorrow if not fixed or halted.

https://www.mediawiki.org/wiki/Development_guidelines

Screenshot 2022-01-26 at 05.24.44.png (252×1 px, 57 KB)

Change 757380 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/core@master] Fix empty div when there's no sitenotice.

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

brennen triaged this task as Unbreak Now! priority.Jan 26 2022, 2:24 PM
Jdlrobson added a subscriber: Jdlrobson.

Caused by T6469. https://gerrit.wikimedia.org/r/757380 looks like it should fix the issue but I'm not set up locally with Extension:DismissableSiteNotice orning so haven't got time to test it until later in my day (also.. more motivation for T259903)

Change 757467 had a related patch set uploaded (by Brennen Bearnes; author: Ammarpad):

[mediawiki/core@wmf/1.38.0-wmf.19] Fix empty div when there's no sitenotice.

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

Change 757380 merged by jenkins-bot:

[mediawiki/core@master] Fix empty div when there's no sitenotice.

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

Change 757467 merged by jenkins-bot:

[mediawiki/core@wmf/1.38.0-wmf.19] Fix empty div when there's no sitenotice.

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

Mentioned in SAL (#wikimedia-operations) [2022-01-26T19:33:14Z] <lucaswerkmeister-wmde@deploy1002> Synchronized php-1.38.0-wmf.19/includes/skins/Skin.php: Backport: [[gerrit:757467|Fix empty div when there's no sitenotice. (T300096)]] (duration: 00m 51s)

matmarex assigned this task to Ammarpad.

Thanks @matmarex for taking care of the review.