Page MenuHomePhabricator

Mobile version of Wikidata broken on some pages
Closed, ResolvedPublic8 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The information appears as in the desktop version, but does not behave normally, going to the right and leaving a blank space.

What should have happened instead?:
I didn't find the same error on every page. On other pages the mobile version is different and we cannot edit the information.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

snapshot_m.wikidata.org_1684428768819.png (696×540 px, 85 KB)

Event Timeline

I see this same error all over the pages of people like Bill Gates and Elon Musk.

snapshot_m.wikidata.org_1684429389495.png (696×540 px, 122 KB)

This is because of the recent changes related to T324991: Make Wikibase not rely on the ResourceLoader target system. Previously, Wikibase added desktop-only ResourceLoader modules unconditionally to the parser output, and relied on the target system to filter them out on mobile. In changes related to that task, we did two things:

  1. Change the PHP code to conditionally add desktop-only ResourceLoader modules depending on whether we’re on mobile or not.
  2. Removed the target declaration from the desktop-only modules.

But what we didn’t realize was that the ResourceLoader modules are part of the parser output in the parser cache. So now the parser cache still contains a bunch of cached parser output which has the desktop-only ResourceLoader modules added (because that output predates change 1), but the modules are now being added everywhere (because change 2 is effective immediately, even for cached output). Change 2 should only have happened four weeks after change 1, after all old parser output is gone from the parser cache.

To fix this, we need to temporarily reintroduce the target declarations. (Until we’ve done that, any particular affected page can also be fixed by purging it, as I’ve just done for Rocket Clown.)

I think this is borderline UBN, and in any case important enough to go into our sprint immediately. Also CCing the people who worked on the target changes (though Michael is currently on {E1641}).

Change 921570 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Restore targets declarations temporarily

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

Hey @LucasWerkmeister so if I understand correctly the plan is to merge https://gerrit.wikimedia.org/r/921570 and revert it a month later, at which point all the pages in cache should be updated. Is that correct? If so that sounds fine to me.

I suggested another approach if you wanted to address this quicker, would be to add some code to MediaWiki:Mobile.js that detects the broken state and applies CSS to fix it.

e.g.

if ( mw.loader.getState( '<problematic-module-in-cache-name>' ) {
  mw.util.addCSS(`/* some CSS that improves the situation */ ' );
}

Hey @LucasWerkmeister so if I understand correctly the plan is to merge https://gerrit.wikimedia.org/r/921570 and revert it a month later, at which point all the pages in cache should be updated. Is that correct? If so that sounds fine to me.

Yes, that’s the plan.

hoo moved this task from Parents/Waiting to Doing on the Wikidata Dev Team (Sprint-∞) board.
hoo subscribed.

Taking this over, targeting a deploy today.

Change 922394 had a related patch set uploaded (by Hoo man; author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@wmf/1.41.0-wmf.9] Restore targets declarations temporarily

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

Change 922395 had a related patch set uploaded (by Hoo man; author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@wmf/1.41.0-wmf.10] Restore targets declarations temporarily

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

Change 921570 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Restore targets declarations temporarily

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

Change 922394 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@wmf/1.41.0-wmf.9] Restore targets declarations temporarily

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

Change 922395 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@wmf/1.41.0-wmf.10] Restore targets declarations temporarily

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

Mentioned in SAL (#wikimedia-operations) [2023-05-23T13:32:25Z] <hoo@deploy1002> Started scap: Backport for [[gerrit:922394|Restore targets declarations temporarily (T336956)]], [[gerrit:922395|Restore targets declarations temporarily (T336956)]]

Mentioned in SAL (#wikimedia-operations) [2023-05-23T13:33:54Z] <hoo@deploy1002> hoo: Backport for [[gerrit:922394|Restore targets declarations temporarily (T336956)]], [[gerrit:922395|Restore targets declarations temporarily (T336956)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-05-23T13:45:14Z] <hoo@deploy1002> Finished scap: Backport for [[gerrit:922394|Restore targets declarations temporarily (T336956)]], [[gerrit:922395|Restore targets declarations temporarily (T336956)]] (duration: 12m 49s)

Change 922396 had a related patch set uploaded (by Hoo man; author: Hoo man):

[mediawiki/extensions/Wikibase@master] Revert "Restore targets declarations temporarily"

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

Thank you for taking care of my mess here! 🙇
I was so focused on making sure that all dependencies are correct in code that I forgot to think about implications from caching 🫤

Change 922396 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Revert "Restore targets declarations temporarily"

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

karapayneWMDE set the point value for this task to 8.
karapayneWMDE set Final Story Points to 8.

"Sitelinks" has been styled similarly to the desktop version. Screenshot below:

snapshot_m.wikidata.org_1688062668827.png (684×540 px, 47 KB)

"Sitelinks" has been styled similarly to the desktop version. Screenshot below:

snapshot_m.wikidata.org_1688062668827.png (684×540 px, 47 KB)

I think that’s for the same reason as T340859: Edit buttons overlap on Minerva on Wikidata.

@Lucas_Werkmeister_WMDE: the T340859 error only pops up for me when I activate the DuplicateReferences gadget. A recent change made mobile and desktop gadgets available by default, causing errors.

This screenshot error happens regardless of the gadget.