Page MenuHomePhabricator

REST API with endpoint /page/mobile-text/{title} always returning 404
Closed, ResolvedPublic


Steps to Reproduce:

Try one the following links:

Actual Results:

Page not found (404)
{"type":"","title":"Not found.","method":"get","uri":"/"}

Expected Results:
Json content should be delivered, like it still is from the other mobile endpoints, like

First noticed on June, the 28th.

Event Timeline

Bgsme created this task.Jun 30 2016, 10:30 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 30 2016, 10:30 AM
mobrovac triaged this task as High priority.Jun 30 2016, 11:07 AM
mobrovac added subscribers: Mholloway, bearND, Dbrant, mobrovac.

It is returning 404s because the service backing it removed it. Unfortunately, there was no heads-up on this from the team.

@Bgsme are you actively using the end-point? Is it useful to you?

@bearND @Mholloway I would propose to resurrect it ASAP, and if the plan is still to go ahead with the removal, announce it properly, set a date for removal and coordinate it.

@mobrovac Oops. I guess that is what "experimental" means.

An android app, i am currently developing, is using it to access Wikipedia content in a structured way without the need to parse any HTML or WikiText.

I hoped the API would become stable over time.

@Bgsme would the other mobile end-points, like mobile-sections help? Even though they are marked as experimental, they are much more stable than mobile-text which currently isn't being actively developed.

@mobrovac What I liked about the mobile-text endpoint, is that it was returning almost pure, structured content. For me this is the main purpose of placing a rest api next to the original website, offering machine-readable access to the content without all the style and formatting.

The other endpoints like mobile-sections are imho basicly returning html wrapped in json.
The html is even containing inline-css-styles and references to css-classes of unknown stylesheets.
A lot of (useless) information that I either would need to filter out or parse and interprete.

Mholloway added a comment.EditedJun 30 2016, 1:01 PM

Very sorry about that, @Bgsme! That endpoint was originally intended to support an experimental "lite" version of the Wikipedia app that has been shelved for now, and admittedly it didn't occur to us that anyone else would be using it; we thought it was essentially dead code.

@mobrovac / @bearND I've got a patch[1] up to revert the change and it looks like there are a couple of hours to deploy before morning SWAT if I can get a +2.


@Bgsme It's quite encouraging to see a third-party consumer using this endpoint! Can I ask how you found out about it? (was it something other than simply browsing the API docs?)
We'd love to see the Android app that you build with this. Let us know when it's done.

For posterity, here is my branch of the official Wikipedia app that uses the mobile-text endpoint to render article content natively in a TextView (no WebView):

OK, @Bgsme, I've just redeployed the code for the mobile-text endpoint and it appears to be working well. Once you've confirmed, I'll mark this as resolved.

Bgsme added a comment.Jun 30 2016, 3:33 PM

Thanks for the revert, @Mholloway. This gives me some more time to think about an alternative.

I just checked out your code and saw how you grabbed the html from the MWApi and transformed the DOM. I guess if you still plan to remove the service, I would have to do something like that in my app (unfortunatly whithout serverside caching ;-)

It's funny, in your readme you almost mention all the reasons why I decided to use this API.

@Dbrant Thanks for the link to your repo. I certainly will take a look at it.
Yes I have found the API just by browsing the API docs. And a little help of Google I guess.

My app is telling stories about places nearby. Wikipedia will be just one source of information (though it was the first). I am also using just native views and no webviews. That's why having a service returning content only, without the overhead of html, looked so appealing.

Bgsme added a comment.Jun 30 2016, 3:35 PM

@Mholloway It works like a charme again. Thanks again.

bearND closed this task as Resolved.Jul 1 2016, 7:50 PM
bearND moved this task from Incoming to To Deploy on the Mobile-Content-Service board.

Is anyone still using the mobile-text endpoint? Note the discussion at the task that was just mentioned and chime in.