Page MenuHomePhabricator

action=edit&section=new&appendtext=... duplicates lead content
Closed, ResolvedPublic


Using api.php?action=edit&title=Talk:Sandbox&section=new&sectiontitle=bar&appendtext=baz&token=(token), where Talk:Sandbox contains the content "foo", results in the content "foo\n==bar==\nfoobaz". The lead content is duplicated in the new section, before the appendtext content.

Version: 1.22.0
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:52 AM
bzimport added a project: MediaWiki-API.
bzimport set Reference to bz52538.

I'm not entirely sure whether specifying appendtext/prependtext with section=new should be an error or if we should DWIM and append/prepend to an empty section.

I'll go with the latter for now, but I could easily be convinced to do the former.

Change 77716 had a related patch set uploaded by Anomie:
API: DWIM for action=edit&section=new&appendtext=...

Change 77716 merged by jenkins-bot:
API: DWIM for action=edit&section=new&appendtext=...

The patch is now merged. It should be deployed to WMF wikis with 1.22wmf13, see for the schedule.