Page MenuHomePhabricator

MobileFrontend should not use Makefile to make minified javascript
Closed, ResolvedPublic

Description

In a mini-hackathon with MaxSem and vvv i installed the MobileFrontend extension and tried it with my local test wiki.

It gave me 8 errors and loading *.min.js on Firefox Firebug console and 4 similar errors on the Chrome dev tools. MaxSem found that it may have something to do with the "<!--[if gt IE 9]><!-->" before lines such as

<script type="text/javascript" src="/ahawiki/extensions/MobileFrontend/javascripts/application.min.js?version="></script>

It's in ApplicationTemplate.php line 70.


Version: unspecified
Severity: normal

Details

Reference
bz35910

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:14 AM
bzimport set Reference to bz35910.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

In a mini-hackathon with MaxSem and vvv i installed the MobileFrontend
extension and tried it with my local test wiki.

It gave me 8 errors and loading *.min.js on Firefox Firebug console and 4
similar errors on the Chrome dev tools. MaxSem found that it may have something
to do with the "<!--[if gt IE 9]><!-->" before lines such as

<script type="text/javascript"
src="/ahawiki/extensions/MobileFrontend/javascripts/application.min.js?version="></script>

It's in ApplicationTemplate.php line 70.

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/MobileFrontend.git;a=tree;f=javascripts;h=ee6aa8c99d584f4ab3fdc24d450efd41a2050e85;hb=HEAD

https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/MobileFrontend.git;a=blob;f=Makefile;h=7680b5aa187d135bbcb7e8fa483776e27ee03e55;hb=HEAD

You needed to run the Makefile to generate the minified versions (or steal the files from elsewhere)

Sam, key here is <!--[if gt IE 9]>. I assure you, he saw it not on IE > 9, as the matter of fact it wasn't IE at all.

What version of Firefox? I just tried on latest build and no problem.
Please confirm that make minified was run or alternatively add

$wgMFConfigProperties = array( 'minifyJS' => false );

to LocalSettings.php and see if that solves the problem..

My ApplicationTemplate.php has <!--[if gt IE 9]><!--> at line 96 - are you sure you up to date?

Jon, maybe you did run the makefile as Reedy says, so you don't experience the symptoms.

I spoke to MaxSem and he said the Makefile was the problem.

This is thus related to bug 34986 - it is obviously confusing having a Makefile in our projects and we should move to resource loader to remove this problem.