Page MenuHomePhabricator

Global modules are not loaded on mobile
Closed, ResolvedPublic


Steps to reproduce:

  • enable the mobilefrontend and globalcssjs roles in vagrant
  • create the User:Admin/global.js page on the dev wiki
  • log in as Admin on the mobile wiki

global.js should be loaded but is not.

Given that local user scripts/styles *are* loaded, this seems like an oversight and not one of MobileFrontend's simplifications.

Event Timeline

Jdlrobson added a subscriber: Jdlrobson.

Which global modules? Could you provide better replication instructions for those that do not use them?

If you are talking about gadgets... Many gadgets are very desktop specific and do not work on mobile and are thus disabled by default (MediaWiki:Mobile.js provides an alternative to MediaWiki:Common.js for example).

MobileFrontend relies on ResourceLoader targets so if something is not loaded it is because it is not using targets. I am confident it is nothing specific to MobileFrontend.

Yup looks like it doesn't specify a mobile target.

Trivial to enable, but be wary of side effects - some global scripts may not be compatible with Minerva and potentially break it.

Can we enable this or add a separate global-mobile.js? I got a request to create a user's minerva.js on all wikis with Synchbot, but it feels like a step backward after all the work to migrate to global.js in the first place.

Change 616960 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[mediawiki/extensions/GlobalCssJs@master] Enable on 'mobile' ResourceLoader target

Legoktm added a subscriber: Legoktm.

For Tech News: Users' global.js and global.css pages will now also be loaded on the mobile site. Refer to the documentation for how to avoid applying styles to the mobile skin.

Change 616960 merged by jenkins-bot:
[mediawiki/extensions/GlobalCssJs@master] Enable on 'mobile' ResourceLoader target