Last modified: 2012-02-24 02:52:10 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 T29257, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27257 - Non-Safari iPhone User Agent Not Redirecting Automatically
Non-Safari iPhone User Agent Not Redirecting Automatically
Status: RESOLVED FIXED
Product: Wikipedia App
Classification: Unclassified
Generic (Other open bugs)
1.0.0 (Android)
All All
: Normal enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on: 24859
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-08 14:24 UTC by smlawsky
Modified: 2012-02-24 02:52 UTC (History)
3 users (show)

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


Attachments

Description smlawsky 2011-02-08 14:24:59 UTC
Is the server that distributes mobile device views of Wikipedia pages having problems the last few days?

No mobile view is noted on the iPhone devices as of Monday, Feb 7, 2011.
Comment 1 Mark A. Hershberger 2011-02-08 22:01:30 UTC
I don't have an iPhone, but when I set my user agent to act like an iPhone, it worked. Maybe this was temporary?  Re-open if this is still a problem for you.
Comment 2 smlawsky 2011-02-08 22:17:36 UTC
It is not working on the iPhone 4 running the latest operating system iOS 4.2 or the Mac iphone SDK development  simulator.

This is a recent problem because it worked before last week.

It has gone down several times in the past year.
Comment 3 Mark A. Hershberger 2011-02-08 22:52:19 UTC
Using the list of UAs I downloaded from http://techpatterns.com/forums/about304.html, I was able to verify that iOS 4.2.x does not redirect but iOS 4.0 does.
Comment 4 smlawsky 2011-02-08 22:59:07 UTC
Can this be fixed by the Wikipedia Server guys or is it an SDK fix at Apple. 
Do you know?
Comment 5 Hampton Catlin 2011-02-09 11:14:53 UTC
Its definitely not the server being down, just to be clear. We've been struggling with new tablet devices (not redirecting them, but redirecting their smaller counterparts) and so have been tweaking the UserAgent matching.

This should be fixed in r81728 which is pending deployment.
Comment 6 Hampton Catlin 2011-02-09 11:16:15 UTC
Also, can you provide the User Agent string that is *not* redirecting, so I can add it to our test suite.
Comment 7 smlawsky 2011-02-09 15:02:29 UTC
The redirect to Mobile view works OK if the iPhone 4 is running iOS 4.2 Safari Browser.
However, it is not working like it did with Apple browser sample code we installed in our app.
That worked until SDK version 4.0 came along, for the the prior year most of the time.
We don't deploy the Safari browser because it forces the user out of our medical iPhone app.

Something changed along the way as you have pointed out.
We are hoping it can be fixed again to redirect as it did previously using url strings like this:

http://en.wikipedia.org/wiki/Breech_birth

Those are the strings that redirected in the past.

I notice that the newest iPhone Safari browse does redirect to the Mobile views OK.
Safari seems to be a smart enough agent to insert another character into the string above when a 
Google search is done on Breech Presentation.

When the link is selected:

Breech birth - Wikipedia, the free encyclopedia 

it goes to:

http://en.m.wikipedia.org/wiki/Breech_birth

Notice that it ads an m to the string automatically and that produces the Mobile View
Comment 8 Hampton Catlin 2011-02-09 15:03:57 UTC
Ah, right. So its not supposed to redirect non-safari browsers on the phone.

All you have to do in your app is to add the "m" after the en and you can have the whole
thing work better anyway.
Comment 9 smlawsky 2011-02-09 15:19:01 UTC
But it did work previously.

The string with the without the M is needed on the iPad to NOT direct to the Mobile view.

Ours is a universal app.

The string is generated by tapping the search engine link.
Comment 10 smlawsky 2011-02-09 18:16:20 UTC
I will be working with my programmer to rewrite our code to redirect to the Mobile format server like the Safari browser does on the iPhone.

It would be better if Wikipedia could see the device type and redirect automatically ... IMO.

I will post our thread  at the Apple iOS developer forum for others to figure out.

My user agent is:

Monzilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9
(KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5
Comment 11 Mark A. Hershberger 2011-02-15 22:59:05 UTC
After talking with Hampton, I need to know if you can supply a CSS file that will work with that user agent, or if the current one is satisfactory.  Once he knows that he can update the UA string for the mobile proxy.
Comment 12 smlawsky 2011-02-16 00:35:37 UTC
This problem with redirect to the Mobile Wikipedia server occurs when I tap Google search links to content on Wikipedia using the iPhone and the User Agent above. We do not post content ourselves for websites that we search for.
Comment 13 Hampton Catlin 2011-02-16 02:23:09 UTC
The CSS is not the problem. This is a temporary bug that has already been fixed in the redirect
code.

That should be the title of the bug.

As I say that, i will go change it.

WATCH THIS SPACE.
Comment 14 smlawsky 2011-02-16 02:28:56 UTC
Hope it fixes it.

Will Watch and let you know.

It has been been sporadic over the past year.

(Redirecting to Mobile and then Not)

Hope the fix works and will stick in future iterations.

Lots of apps that do not use iOS Safari on iPhones with Apple's prior UIWebView Kit Code.
Comment 15 smlawsky 2011-02-16 07:03:52 UTC
Not sure how long changes to propagate.

No change regarding above redirect fix is noted as of 0700 UTC

Wednesday, February 16, 2011
Comment 16 smlawsky 2011-02-16 14:40:26 UTC
Some pages are now opening after a short delay to the redirected mobile view after tapping on a search engine link.  However some pages remain in the regular wikipedia view.

When this was working well previously there was no delay of going the the wikipedia view first and then to the mobile site.  It just immediately directed to the mobile site on the iPhone with the  UIWebView Code from Apple that we use.

Some pages are not redirecting:

This link redirects after going to the regular wikipedia view initially. 

Shoulder dystocia - Wikipedia, the free encyclopedia


This link does not redirect on the iPhone after going to the regular wikipedia view initially.

 Breech birth - Wikipedia, the free encyclopedia

It looks like it is starting to work but not entirely like it was.
Comment 17 smlawsky 2011-02-17 06:47:51 UTC
More pages are redirecting now on the iPhone... but there are some outliers that are not redirectine.

eg.

Breech birth - Wikipedia, the free encyclopedia ... is now redirecting to the mobile wikipedia pages.

But these still are appearing on the regular Wikipedia pages on the iPhone when a search link is tapped:

These are not redirecting to the Mobile pages.

3-beta-HSD - Wikipedia, the free encyclopedia

3-Hydroxy-3-methylglutaryl-coenzyme a lyase deficiency - Wikipedia, the free encyclopedia

3-Methylcrotonyl-CoA Carboxylase Deficiency - Wikipedia, the free encyclopedia
Comment 18 smlawsky 2011-02-20 06:45:17 UTC
When selecting the Google link:

3-beta-HSD - Wikipedia, the free encyclopedia

it links the mobile page on Wikipedia via:

http://en.m.wikipedia.org/wiki/3-beta-HSD?wasRedirected=true

Most of the Google links do open into the Mobile site using the iPhone 4 iOS 4.2 Browser now like the following link. 


However, there are still a number of problem areas:


When selecting the Google link:

2,4-Dienoyl-CoA reductase deficiency - Wikipedia, the free ...

The browser attempts to  open:

http://en.wikipedia.org/wiki/2,4_Dienoyl-CoA_reductase_deficiency


This opens the regular Wikipedia page instead of the Mobile link:

http://en.m.wikipedia.org/wiki/2,4_Dienoyl-CoA_reductase_deficiency


A similar problem occurs when trying to link to:

3-hydroxy-3-methylglutaryl-CoA lyase deficiency - Wikipedia, the ...

This goes to the regular Wikipedia Page:

http://en.wikipedia.org/wiki/3-hydroxy-3-methylglutaryl-CoA_lyase_deficiency

instead of the one that opens the mobile wikipedia page.

http://en.m.wikipedia.org/wiki/3-hydroxy-3-methylglutaryl-CoA_lyase_deficiency

Other google search links on the iPhone that truncate do not seem to redirect to the mobile Wiki pages when tapped either:

3-Methylcrotonyl-CoA carboxylase deficiency - Wikipedia, the free ...

Is the any way to have the longer truncated link redirect when selected:
Comment 19 smlawsky 2011-02-22 08:55:19 UTC
Looks like its fixed now.

Thanks a lot for your kind help!

Hope it continues to work in the future.

I'll make a donation to Wikipedia.

Steve Mlawsky, M.D.
C.E.O., IatroCom
Comment 20 smlawsky 2011-03-07 05:51:49 UTC
Everything was working OK until I just noticed a failure of all weblink redirects to the Wikipedia Mobile servers at 5:47 UTC Monday, March 7, 2011 while using iPhone 4 as previously discussed in this bug report. What happened?
Comment 21 Hampton Catlin 2011-03-07 13:01:01 UTC
This is a separate issue. 

Nothing is redirecting right now because of some changes to Mediawiki that broke ALL redirection. :P

I'll open another ticket for it.
Comment 22 smlawsky 2011-03-07 18:51:39 UTC
Appreciate if this can be stabilized.

The behavior has been erratic with many episodes over the last year will loss of mobile site redirect.

Seems it keeps breaking down periodically. 

I have at least 200 doctors using an app that may access the mobile links...

Thanks for prompt help with this issue.
Comment 23 smlawsky 2011-03-07 18:53:32 UTC
Appreciate if this can be stabilized.

The behavior has been erratic with many episodes over the last year will loss of mobile site redirect.

Seems it keeps breaking down periodically. 

I have at least 200 doctors using an app that may access the mobile links...

Thanks for prompt help with this issue.
Comment 24 smlawsky 2011-03-08 03:04:33 UTC
Some web links are beginning to redirect now to the Mobile Web Page site(s) from iPhone4 client.

This occurs OK when hyper text words in Wikipedia articles are tapped.

e.g. 

Acrocallosal Syndrome
Agenesis of the Corpus Callosum

When search engine links are tapped for the same words:
These open appropriately to the redirected pages as well.

However, there are still other web pages that are NOT redirecting to the Mobile pages yet:

Basal Cell Nevus Syndrome
Bardet-Biedl Syndrome

Evidently Mobile content is spread across a number of asynchronous server sites.
The fixes do NOT appear to propagate at one time to redirect these functions to work globally.

Hopefully, when all of this is reset again it will stay up in the future and not keep going down.

Perhaps, having the option to turn off Mobile displays is confounding things some place.
Comment 25 Roan Kattouw 2011-03-08 10:14:09 UTC
(In reply to comment #24)
> Evidently Mobile content is spread across a number of asynchronous server
> sites.
It's probably just that we use quite aggressive caching.
Comment 26 smlawsky 2011-03-08 16:03:30 UTC
What occurred after this was all fixed over the last month and working nicely?

 Now it is not working again.
Comment 27 smlawsky 2011-03-09 06:13:46 UTC
When will this be working again?

How long is the iPhone redirect to Wiki Mobile sites take to repair?
Comment 28 Tomasz Finc 2011-08-03 20:31:31 UTC
Per 24859. We've increased the number of UA's detected quite drastically.
Comment 29 Tomasz Finc 2011-08-05 21:02:58 UTC
Resolving. All the iOS server redirects are now in place. If this is still happening please re-open and tell us the UA that is still seeing this.

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


Navigation
Links