Page MenuHomePhabricator

Extract Page Issues as a structured array
Closed, ResolvedPublic

Description

We should pull out page issues in an array identifying what section they belong to.
We should leave a marker in the content so we know where the issues was removed from.

This should be almost identical to how we handle references.

Event Timeline

We have code that does this already in MCS in the experimental 'formatted' endpoint

e.g. http://0.0.0.0:6927/en.wikipedia.org/v1/page/formatted/User:Jdlrobson%2Fmcs-tests%2Fissues_bug

Example output:

"issues":[{"text":"This article <b>is an <a href=\"./Wikipedia:Orphan\" title=\"Wikipedia:Orphan\">orphan</a>, as no other articles <a rel=\"mw:ExtLink\" href=\"//en.wikipedia.org/w/index.php?title=Special:Whatlinkshere&amp;target=Jdlrobson/mcs-tests/issues_bug&amp;namespace=0\">link to it</a></b>. Please <a href=\"./Help:Link\" title=\"Help:Link\">introduce links</a> to this page from <span class=\"plainlinks\"><a rel=\"mw:ExtLink\" href=\"//en.wikipedia.org/w/index.php?title=Special%3ASearch&amp;redirs=1&amp;search=Jdlrobson%2Fmcs-tests%2Fissues+bug&amp;fulltext=Search&amp;ns0=1&amp;title=Special%3ASearch&amp;advanced=1&amp;fulltext=Jdlrobson%2Fmcs-tests%2Fissues+bug\">related articles</a></span>; try the <a rel=\"mw:ExtLink\" href=\"//edwardbetts.com/find_link?q=Jdlrobson/mcs-tests/issues_bug\">Find link tool</a> for suggestions.  <small><i>(September 2012)</i></small>"},{"text":"This article <b>does not <a href=\"./Wikipedia:Citing_sources\" title=\"Wikipedia:Citing sources\">cite</a> any <a href=\"./Wikipedia:Verifiability\" title=\"Wikipedia:Verifiability\">sources</a></b>.  <small><i>(August 2012)</i></small>"}],"revision":"738256918","lastmodified":"2016-09-07T21:30:23Z","lastmodifier":{"name":"Jdlrobson","gender":"unknown"},"displaytitle":"User:Jdlrobson/mcs-tests/issues bug","normalizedtitle":"User:Jdlrobson/mcs-tests/issues bug"

We should leave a marker in the content so we know where the issues was removed from.

Any reason for this requirement?

Change 409184 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Metadata: Add page issues

https://gerrit.wikimedia.org/r/409184

Change 410545 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Handle hatnotes and issues in any section

https://gerrit.wikimedia.org/r/410545

Change 410545 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Handle hatnotes and issues in any section

https://gerrit.wikimedia.org/r/410545

Change 409184 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Metadata: Add page issues

https://gerrit.wikimedia.org/r/409184

Change 413053 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[mediawiki/services/mobileapps@master] Metadata: remove 'text' property from hatnotes and page issues

https://gerrit.wikimedia.org/r/413053

Change 413053 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Metadata: remove 'text' property from hatnotes and page issues

https://gerrit.wikimedia.org/r/413053