Page MenuHomePhabricator

Specifying an invalid section with action=edit doesn't throw a nosuchsection error
Closed, ResolvedPublic


Was writing tests for testEditSection and noticed this...

Setting &section=300 on [[User:Legoktm]] (no sections at all) returns:


"edit": {
    "result": "Success",
    "pageid": 14989378,
    "title": "User:Legoktm",
    "contentmodel": "wikitext",
    "nochange": ""


It should have thrown an error of "nosuchsection".

Version: 1.22.0
Severity: normal



Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:58 AM
bzimport set Reference to bz53884.
bzimport added a subscriber: Unknown Object (MLST).

I'm not entirely sure that this is a regression; if it is, it's not a recent one (probably dating back to when ContentHandler was introduced, although I haven't tested back that far). But yes, this should be fixed.

Looking at the code, I don't see any sign of a regression here.

Change 83833 had a related patch set uploaded by Anomie:
API: Check for nosuchsection in all code paths

Change 83833 merged by jenkins-bot:
API: Check for nosuchsection in all code paths

Change merged. It should be deployed to WMF wikis with 1.22wmf19, see for the schedule.