Last modified: 2014-02-12 23:45:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T43340, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41340 - MobileFrontend: Implement ResourceLoader (tracking)
MobileFrontend: Implement ResourceLoader (tracking)
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
Feature requests (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Nobody - You can work on this!
:
: 31675 (view as bug list)
Depends on:
Blocks: 28515 29713 44017 44070 44072
  Show dependency treegraph
 
Reported: 2012-10-24 01:01 UTC by Jon
Modified: 2014-02-12 23:45 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2012-10-24 01:01:28 UTC
Go to http://fr.m.wikipedia.org/wiki/Wikip%C3%A9dia:Accueil%20principal?title=Wikip%C3%A9dia:Accueil_principal&mobileaction=toggle_view_mobile in beta mode

Open console
I get the error ""Uncaught ReferenceError: wgPageContentLanguage is not defined"
Comment 1 Krinkle 2012-10-24 01:02:46 UTC
That doesn't look like a ResourceLoader environment.

Where is the startup module, its mw.config and the page-specific and user-specific mw.config and mw.user output from OutputPage?
Comment 2 Krinkle 2012-10-24 01:10:56 UTC
(In reply to comment #1)
> That doesn't look like a ResourceLoader environment.
> 
> Where is the startup module, its mw.config and the page-specific and
> user-specific mw.config and mw.user output from OutputPage?

Ah, I didn't enter "beta" mode (via search menu, Configurations, toggle "Beta", save, reload).

Okay, so it does output the startup module, but does so incorrectly and the rest of the environment does indeed not look like how ResourceLoader presents it self usually (appears re-invented/hardcoded for mf).

OutputPage does / ResourceLoader expects:

* startup module in the <head> before any load.php script
* <head> needs to contain mw.user and mw.config
* <head> will output top queue (if any)
* <body> will output bottom queue

Right now MF does:

* startup module at bottom of <body>
* <body> will output bottom queue

Tracking down the error in particular it looks like "Uncaught ReferenceError: wgPageContentLanguage is not defined" is just the first in a long sequence of errors caused by the invalid environment.
Comment 3 Krinkle 2012-10-25 20:27:41 UTC
> OutputPage does / ResourceLoader expects:
> 
> * startup module in the <head> before any load.php script
> * <head> needs to contain mw.user and mw.config
> * <head> will output top queue (if any)
> * <body> will output bottom queue
> 

Also: oldschool raw styles/scripts added by extensions in head/body respectively, such as geoiplookup in CentralNotice which provides the "Geo" global variable.

> Right now MF does:
> 
> * startup module at bottom of <body>
> * <body> will output bottom queue
> 
> Tracking down the error in particular it looks like "Uncaught ReferenceError:
> wgPageContentLanguage is not defined" is just the first in a long sequence of
> errors caused by the invalid environment.
Comment 4 Jon 2012-10-27 00:08:19 UTC
*** Bug 31675 has been marked as a duplicate of this bug. ***
Comment 5 Jon 2013-02-28 01:18:04 UTC
ResourceLoader is now implemented in mobile. There are a few bugs to perfect it's implementation. I don't think the existence of this tracking bug is useful anymore. Feel free to disagree.
Comment 6 Juliusz Gonera 2013-02-28 19:08:07 UTC
I'm afraid there is still something we're missing. JavaScript tests page loads JS at the bottom instead of top (as it does in desktop) for some reason which breaks PhantomJS runner after applying this changeset: https://gerrit.wikimedia.org/r/#/c/50442/
Comment 7 Juliusz Gonera 2013-02-28 19:09:37 UTC
After reconsidering this, I'll open a separate bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links