Last modified: 2014-02-12 23:45:17 UTC
I installed MediaWiki 1.21.3 with MobileFrontend 30dad7e on a Debian Wheezy. If I set the $wgMobileUrlTemplate variable to a fixed constant, like this: $wgMobileUrlTemplate = 'www.m.mydomain.org'; it is not used at all to compose the "Mobile view" link at the bottom of the page. The standard domain 'www.mydomain.org' is used instead. If the variable contains a placeholder at the begin, the "Mobile view" link is correct: $wgMobileUrlTemplate = '%h0.m.%h1.%h2';
Prioritization and scheduling of this bug is tracked on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/mobile/cards/1498
Niccolo, when the functionality for the alternate mobile domain was initially written, it supported a static mobile domain (rather than the template). As the codebase evolved, it appears this functionality disappeared - likely as an oversight. I took a quick look over the host-handling code and I *think* it should be a quick fix, however this is fairly low priority relative to many of the other bugs/new feature work we currently have lined up. This could be a great bug for a volunteer to pick up. The places to look in the code for resolving this are in includes/MobileContext.php - MobileContext::getMobileUrl() and MobileContext::updateMobileUrlHost(). The related PHPUnit tests will also need an update.
Quim - you know the drill - google code in could work here :D
Done. Thank you!
MediaWiki 1.21.3 (54f7112) MobileFrontend 0.7.0 (30dad7e) LocalSettings.php: require_once("extensions/MobileFrontend/MobileFrontend.php"); $wgMFAutodetectMobileView = true; $wgMobileUrlTemplate = 'www.m.mydomain.org'; The generated link is: "http://www.m.mydomain.org/[rest of the URL here]" Am I doing something wrong here? It's looking like there's no bug at all...
Same for me, seems to be working.
GCI task deleted... Thank you Mateusz for the verification, and sorry for the extra work spent. This is another type of lesson to be learned about things that may happen in any free software project...
Although no patch was needed reviewing the bug was obviously needed - so thanks Mateusz for verifying this is no longer a problem! :)
On a second thought... We have been able to resolve this as WORKSFORME thanks to a first investigation and verification from Mateusz. This should count as a resolved GCI task. Recreated.