Last modified: 2014-02-12 23:48:02 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 T46072, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44072 - RL modules specifying 'position' => 'bottom' aren't loading
RL modules specifying 'position' => 'bottom' aren't loading
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
beta (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
http://www.mediawiki.org/wiki/Manual:...
:
Depends on: 41340
Blocks: 44070
  Show dependency treegraph
 
Reported: 2013-01-17 19:04 UTC by Ori Livneh
Modified: 2014-02-12 23:48 UTC (History)
11 users (show)

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


Attachments

Description Ori Livneh 2013-01-17 19:04:15 UTC
The problem is in SkinMobile.php. 'position' => 'top' modules are packed into the $headModuleNames array and 'position' => 'bottom' are packed into $moduleNams. $headModuleNames are loaded properly and without fanfare, but there is some code hacking around ResourceLoader with $moduleNames (grep for '$bottomScripts') that (as far as I can determine) only works for 'raw' modules.
Comment 1 Ori Livneh 2013-01-17 19:08:27 UTC
Specifically I think this would only work for 'raw' scripts since it bypasses most of ResourceLoader:

			$bottomScripts = Html::inlineScript(
				ResourceLoader::makeLoaderConditionalScript(
					Xml::encodeJsCall( 'mw.loader.load', array( $moduleNames ) )
				)
			);
Comment 2 Jon 2013-02-02 00:49:12 UTC
Two things going on here:
1) https://gerrit.wikimedia.org/r/#/c/47193/ will make the bottom scripts behave well

2) Modules in EventLogging need to declare themselves as having target mobile - currently $headLinks[] = $this->resourceLoaderLink( $headModuleNames, 'scripts' ); ignores the target property - this is a bug and needs to be fixed.

(see getTargets function in ResourceLoaderModule)
Comment 3 Ori Livneh 2013-02-02 18:56:46 UTC
(In reply to comment #2)
> 2) Modules in EventLogging need to declare themselves as having target mobile

Gerrit change #47206 (merged) adds 'mobile' to targets EventLogging modules.
Comment 4 Jon 2013-02-05 19:16:06 UTC
https://gerrit.wikimedia.org/r/#/c/47546/ takes care of this on MFE side.

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


Navigation
Links