ucla-oarc-mobile / mwf

UCLA Mobile Web Framework
http://mwf.ucla.edu
Other
86 stars 25 forks source link

Firefox v10.0.4 on Android version: 2.3.4 not redirecting to mobile #140

Closed BerkeleyEdu closed 12 years ago

BerkeleyEdu commented 12 years ago

My colleague noticed that the mobile redirect script does not work on his Android whe using Firefox. Here are the details:

Phone model: Droid X Network: Verizon System version 4.5.621.MB810 Android version: 2.3.4 Browsers:

Firefox v10.0.4
Opera Mini v7.0.29703
Default browser v2.3.4

When you go to "http://www.berkeley.edu" does it redirect you to the choice page? Firefox: No (and I tried clearing cookies first) Opera: Yes Default browser: Yes

-Sara Leavitt (UC Berkeley)

Trott commented 12 years ago

Not sure if this is part of the problem or not, but it looks to me like the user agent string causes a hard crash in getBrowserEngine() in the user agent JS in the version of MWF running at m.berkeley.edu.

In version 1.3, it does not fail hard like that. (Thanks, refactoring for unit tests!)

ebollens commented 12 years ago

Sara, can you send the user to this page and let me know what his output is: http://mwf.ucla.edu/framework13/mwf/device.php

BerkeleyEdu commented 12 years ago

Here you go!

MWF Device The Framework Server Info User Agent Mozilla/5.0 (Android; Mobile; rv:10.0.4) Gecko/10.0.4 Firefox/10.0.4 Fennec/10.0.4 IP Address 174.253.241.28 http://174.253.241.28

JS Classification mwf.classification.isMobile() false mwf.classification.isBasic() true mwf.classification.isStandard() true mwf.classification.isFull() true mwf.classification.isOverride() false mwf.classification.isPreview() false

PHP Classification Classification::is_mobile() true Classification::is_basic() true Classification::is_standard() false Classification::is_full() false Classification::is_override() false Classification::is_preview() false

JS User Agent mwf.userAgent.getOS() android mwf.userAgent.getOSVersion() false mwf.userAgent.getBrowser() firefox mwf.userAgent.getBrowserEngine() gecko mwf.userAgent.getBrowserEngineVersion() 10.0.4

PHP User Agent User_Agent::get_os() android User_Agent::get_os_version() false User_Agent::get_browser() firefox User_Agent::get_browser_engine() gecko User_Agent::get_browser_engine_version() 10.0.4

JS Screen mwf.screen.getHeight() 854 mwf.screen.getWidth() 480 mwf.screen.getPixelRatio() 1 PHP Screen Screen::get_height() 854 Screen::get_width() 480 Screen::get_pixel_ratio() 1

On 5/3/2012 9:59 AM, Eric Bollens wrote:

Sara, can you send the user to this page and let me know what his output is: http://mwf.ucla.edu/framework13/mwf/device.php


Reply to this email directly or view it on GitHub: https://github.com/ucla/mwf/issues/140#issuecomment-5492437

Sara Leavitt, Electronic Communications Specialist UC Berkeley Office of Public Affairs 2200 Bancroft Way, Berkeley, CA 94720-4204 Phone: 510 643-6163 http://events.berkeley.edu http://www.berkeley.edu/mobile

ebollens commented 12 years ago

Sara, did you look into Rich's comment? Is the issue resolved or still a problem?

Trott commented 12 years ago

I'm pretty sure it's still a problem in 1.2....

ebollens commented 12 years ago

What was the commit that fixed it in 1.3? We should probably do a back-merge.

Trott commented 12 years ago

I haven't tested this theory but I suspect the commit you are looking for is the tiny one submitted to fix issue #9.

BerkeleyEdu commented 12 years ago

...so should I wait until 1.3 or do you recommend I add that line to useragent.src.js?

Got another report of the redirect not working -- this time on a "crusty" iPod Touch: Version 1.1.5

"The redirect to the Library's mobile choice page worked this morning. I tapped Mobile site and the iPod Touch stalled out at http://m.berkeley.edu/assets/passthru.php etc."

On 5/10/2012 7:55 PM, Trott wrote:

I haven't tested this theory but I suspect the commits you are looking for is the tiny one submitted to fix issue #9.


Reply to this email directly or view it on GitHub: https://github.com/ucla/mwf/issues/140#issuecomment-5642805

Sara Leavitt, Electronic Communications Specialist UC Berkeley Office of Public Affairs 2200 Bancroft Way, Berkeley, CA 94720-4204 Phone: 510 643-6163 http://events.berkeley.edu http://www.berkeley.edu/mobile

Trott commented 12 years ago

Up to you. I would probably do the latter (and then minify it into useragent.js--http://refresh-sf.com/yui/ can be convenient for that if you don't have a minifier handy).