Page MenuHomePhabricator

AFTv5 API error on talk pages for non-existent pages
Closed, ResolvedPublic

Description

When I visit http://en.wikipedia.beta.wmflabs.org/wiki/Talk:NonexistentPage the page makes a failing API call

http://en.wikipedia.beta.wmflabs.org/w/api.php?action=articlefeedbackv5-get-count&format=json&pageid=0&filter=*

With ?debug=1, the JS console logs:

mw.Api error: nosuchpageid
Object { code="nosuchpageid", info="There is no page with ID 0"}

AFTv5 is asking for the feedback count for the article whose talk page this is, but the article doesn't exist so its page ID is 0. Various parts of the AFTv5 codebase could be aware that pageID == 0 means no page, so don't bother for its feedback. (It seems includes/api/ApiBase.php actually queries the 'page' DB table to look up page_id 0, I'll file a separate bug.)

This happens for real on beta labs when we enable Flow on a talk page such as Talk:Flow and don't create the page for it. But it's not a Flow bug.

Maybe there's a bug that AFTv5 ought not to run at all if a page is a Flow board, but the logic seems sound: this is the talk page for a page for which AFTv5 is enabled, and AFTv5 intentionally asks for a count of feedback for that page.


Version: master
Severity: minor
URL: http://en.wikipedia.beta.wmflabs.org/wiki/Talk:NonexistentPage?debug=1
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=61166

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 2:57 AM
bzimport set Reference to bz61164.
bzimport added a subscriber: Unknown Object (MLST).

See bug 61163 about removing AFTv5 from all wikis.

(In reply to comment #0)

(It seems includes/api/ApiBase.php actually queries the 'page' DB
table to look up page_id 0, I'll file a separate bug.)

I filed bug 61166.

Jdforrester-WMF subscribed.

All development work on AbuseFilter v.5 (and indeed, previous versions) is halted. The project is archived, so having open tasks is inappropriate. Consequently, I'm closing all tasks.

SamanthaNguyen moved this task from Backlog to Bugs on the ArticleFeedbackv5 board.
SamanthaNguyen subscribed.

Re-investigating issue per T146253

Change 496107 had a related patch set uploaded (by Jack Phoenix; owner: Jack Phoenix):
[mediawiki/extensions/ArticleFeedbackv5@master] Optimization: don't perform an API query on nonexistent talk pages

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

Change 496107 merged by jenkins-bot:
[mediawiki/extensions/ArticleFeedbackv5@master] Optimization: don't perform an API query on nonexistent talk pages

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

ashley claimed this task.
ashley removed a project: Patch-For-Review.