Page MenuHomePhabricator

Unexpected "summaryrequired" when creating a new section using the API
Closed, ResolvedPublic

Description

Issue: Unexpected "summaryrequired" when creating a new section using the API

POST /w/api.php

action       edit
format       json
section      new
sectiontitle The new section's title
text         foobar
title        Commons:Sandbox
token        XXX+\
{"servedby":"mw1202","error":{"code":"summaryrequired","info":"Summary required","*":"See https://commons.wikimedia.org/w/api.php for API usage"}}

From the API docs:

summary: Edit summary. Also section title when section=new and sectiontitle is not set.

Expected: No edit summary or an auto-created one like /* The new section's title */ new section

Event Timeline

Rillke raised the priority of this task from to Needs Triage.
Rillke updated the task description. (Show Details)
Rillke added a project: MediaWiki-Action-API.
Rillke subscribed.

Interesting. The attempt to bypass this error message has been broken for a long time (maybe even since it was first written), but since the 'wpAutoSummary' isn't being supplied by the API either it only triggers for section=new (and only when the 'forceeditsummary' preference is set).

gerritbot subscribed.

Change 186086 had a related patch set uploaded (by Anomie):
API: Fix setting of wpIgnoreBlankSummary in action=edit

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

Patch-For-Review

Change 186086 merged by jenkins-bot:
API: Fix setting of wpIgnoreBlankSummary in action=edit

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

Should be deployed to WMF wikis with 1.25wmf16, see https://www.mediawiki.org/wiki/MediaWiki_1.25/Roadmap for the schedule.