Page MenuHomePhabricator

Notice: Undefined offset: 1 in /vagrant/mediawiki/extensions/DeleteBatch/DeleteBatch.body.php on line 266
Closed, ResolvedPublic

Description

This happens when deleting on Special:DeleteBatch with a list of pages supplied with a file upload. Does not appear to happen when using the text area.

Encountered during testing for T180818: Convert DeleteBatch to use extension registration.

Event Timeline

Yep, it seems to be the issue reported by @Zoranzoki21 on IRC a couple of days ago. Thanks for reporting!

This happens because of the ambiguity of https://translatewiki.net/wiki/MediaWiki:Deletebatch-help/en which does make it look like the reason is optional, and by extension, the separating pipe. This is a case of not properly handling incorrect input: the extension should either allow omitting the pipe symbol or display an error that the format of the supplied file is not correct. Question is which of the approaches is the desirable one. I can whip up a patch if necessary.

Personally, I'm leaning towards to allow omitting the pipe, assuming it exists is the sole reason we're getting this error and the script runs fine despite the error.

Yep, it seems to be the issue reported by @Zoranzoki21 on IRC a couple of days ago. Thanks for reporting!

Yes, it is.

Omitting the pipe looks good to me. After all we can already delete pages w/o putting a reason.

Change 403473 had a related patch set uploaded (by Mainframe98; owner: Mainframe98):
[mediawiki/extensions/DeleteBatch@master] Fix message ambiguity and allow omitting pipe

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

Change 403473 had a related patch set uploaded (by Mainframe98; owner: Mainframe98):
[mediawiki/extensions/DeleteBatch@master] Fix message ambiguity and allow omitting pipe

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

All is ok. This patch will resolve reported problem.

Change 403473 merged by jenkins-bot:
[mediawiki/extensions/DeleteBatch@master] Fix message ambiguity and allow omitting pipe

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

MarcoAurelio assigned this task to Mainframe98.
MarcoAurelio triaged this task as High priority.
MarcoAurelio removed a project: Patch-For-Review.

Patch merged on master branch.