Last modified: 2011-09-20 17:23:08 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 T33012, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31012 - mobile version replaced by desktop version in a webview on iPad apps
mobile version replaced by desktop version in a webview on iPad apps
Status: RESOLVED FIXED
Product: Wikimedia Mobile
Classification: Unclassified
devices (Other open bugs)
--
Other other
: Unprioritized critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 31013 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-19 21:15 UTC by Greg
Modified: 2011-09-20 17:23 UTC (History)
2 users (show)

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


Attachments

Description Greg 2011-09-19 21:15:38 UTC
in many iPad apps :
an ios webview loading the mobile url http://en.m.wikipedia.org/wiki/Paris will not load the mobile version but the desktop version.

this is also the case for all mobile url I could test. This is very annoying as many ipad apps are loading the mobile url in a webview which is not fullscreen, and so the wiki is not easily readable.

thanks for your help !
Comment 1 Brion Vibber 2011-09-19 21:27:39 UTC
Can you confirm that it's directly loading http://en.m.wikipedia.org/wiki/Paris -- and *not* loading http://en.wikipedia.org/wiki/Paris and then expecting an automated redirect?

Can you recommend any particular apps to try to help reproduce the problem for testing?
Comment 2 Greg 2011-09-19 21:49:57 UTC
Hi Brion,

I confirm the UIWebView is really loading http://en.m.wikipedia.org/wiki/Paris  and is NOT expecting an automated redirect.

This happens on iPad for example with this free app (but not on iPhone)
http://itunes.apple.com/fr/app/world-explorer/id381581095?mt=8
here's a promo code to download it : FE9T7YXJ7M7F
Procedure to use the code:
+ Open the appstore on the iPad
+ click on "Selection"
+ go to the bottom of the page
+ click on "Redeem code"
+ enter the code
+ the app is downloaded for free.


This also happens on this Free Mac app :
http://itunes.apple.com/us/app/world-explorer/id414872849?mt=12


thanks for your help !

regards
Comment 3 Greg 2011-09-19 21:52:21 UTC
*** Bug 31013 has been marked as a duplicate of this bug. ***
Comment 4 Greg 2011-09-19 22:17:45 UTC
the following code is from the mac app mentioned above. It shows that the app really loads the mobile url :

NSString *wikURL = [NSString stringWithFormat:@"http://en.m.wikipedia.org/wiki/%@",wikTitle ];

[webView setMainFrameURL:wikURL];
Comment 5 Brion Vibber 2011-09-19 22:52:55 UTC
We can indeed confirm this on the iPad and Mac versions, much to our surprise. :)

The request is going to en.m.wikipedia.org but somehow is getting back the desktop view -- the HTTP request headers are:

GET /wiki/Eiffel%20Tower HTTP/1.1
Host: en.m.wikipedia.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.50 (KHTML, like Gecko)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

Aha, we think it's the use of spaces in the title -- the canonical hit should be to /wiki/Eiffel_Tower (with underscore). It looks like MediaWiki's coming back with the canonical-form redirect before the MobileFrontend system has a chance to override the output -- and since it directs to the non-mobile URL, you no longer get the mobile view.

We'll see if we can workaround...
Comment 6 Brion Vibber 2011-09-19 23:18:26 UTC
I added a hook in r97573 (on trunk - to be merged) which Patrick should be able to use to abort or alter the redirect when on the special mobile domain. Might want/need more generalization in the future, but the code in MediaWiki::performRequest is just not well factored right now. :)
Comment 7 Brion Vibber 2011-09-19 23:26:06 UTC
Merged to REL1_18 and 1.17wmf1.
Comment 8 Patrick Reilly 2011-09-20 17:22:57 UTC
Fix added in r97645 to Mobile Frontend extension to abort redirect on special mobile domain.

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


Navigation
Links