API action=import doesn't say anything when no revisions are imported
Open, LowPublic

Description

When the API action=import ends up importing no revisions or log entries, the following response is returned:

{
    "import": []
}

It should be a bit more informative.

This response also seems to be returned when the requesting user is blocked.

TTO created this task.Dec 23 2015, 3:21 AM
TTO updated the task description. (Show Details)
TTO raised the priority of this task from to Normal.
TTO added a subscriber: TTO.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 23 2015, 3:21 AM
TTO renamed this task from API action=import doesn't report error messages to API action=import doesn't say anything when no revisions are imported.Dec 23 2015, 3:23 AM
TTO updated the task description. (Show Details)
TTO lowered the priority of this task from Normal to Low.
TTO set Security to None.
Anomie added a subscriber: Anomie.Dec 28 2015, 3:34 PM
{
    "import": []
}

It tells you that nothing was imported by returning an empty array for the list of things that were imported. What more is needed, really?

This response also seems to be returned when the requesting user is blocked.

ApiImportReporter isn't doing anything with the reportNotice method. That should be fixed, although to do it well would want improving of ImportReporter::reportNotice to include context (i.e. the Title object or the title-text that was invalid) instead of just being passed a message key and parameters.

ApiImportReporter is also ignoring the importing of log entries, which should probably also be fixed somehow. The web UI's handling doesn't seem that great, though, it just counts how many were seen total without even considering whether any were skipped (invalid title or already imported).

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Dec 28 2015, 3:34 PM