Last modified: 2013-11-28 14:47:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59708, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57708 - Editing section through API would always result in editconflict
Editing section through API would always result in editconflict
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.23.0
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-28 12:08 UTC by Jimmy Xu
Modified: 2013-11-28 14:47 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jimmy Xu 2013-11-28 12:08:38 UTC
I was crafting a Twinkle module for zhwiki to close AfD requests: delete the page and close the discussion in that day's log. However doing the latter always results in edit conflict, and the edit did not came through. I'm sure the page is not actually in conflict (tried with multiple pages under that prefix).

Chrome's inspect element gives:

0)  action: delete
    ...

1)  action: query
    prop: info|revisions
    intoken: edit
    titles: Wikipedia:頁面存廢討論/記錄/2013/11/20
    rvprop: content
    rvsection: 7
    inprop: protection
    format: xml

  Response:
<?xml version="1.0"?><api><query><pages><page pageid="3726834" ns="4" title="Wikipedia:頁面存廢討論/記錄/2013/11/20" contentmodel="wikitext" pagelanguage="zh" touched="2013-11-28T11:32:18Z" lastrevid="29346485" counter="" length="23624" starttimestamp="2013-11-28T11:32:19Z" edittoken="ff2debd7771781fe58906b44f4deabdc+\"><protection /><revisions><rev contentformat="text/x-wiki" contentmodel="wikitext" xml:space="preserve">====[[史帕克]]====
{{Findsources|史帕克}}
*{{vd}} 缺乏關注度。--[[User talk:SiuMai|Qui cherche trouve]] 2013年11月26日 (二) 02:45 (UTC)</rev></revisions></page></pages></query></api>

2)  action: edit
    title: Wikipedia:頁面存廢討論/記錄/2013/11/20
    summary: /* 史帕克 */ 删除 ([[WP:TW|TW]])
    watchlist: nochange
    section: 7
    notminor: true
    text: ====[[史帕克]]====
{{delh|d}}
{{Findsources|史帕克}}
*{{vd}} 缺乏關注度。--[[User talk:SiuMai|Qui cherche trouve]] 2013年11月26日 (二) 02:45 (UTC)
----
: 删除。--~~~~
{{delf}}
    basetimestamp: 2013-11-28T11:32:18Z
    starttimestamp: 2013-11-28T11:32:19Z
    nocreate:
    format: xml
    token: ff2debd7771781fe58906b44f4deabdc+\

  Response:
<?xml version="1.0"?><api servedby="mw1120"><error code="editconflict" info="Edit conflict detected" /></api>

Retry with basetimestamp removed would let the edit go through, but changing that date to tomorrow won't. Purging also does nothing. When pasting the exact text in index.php it would go through normally.

Please kindly advise if I had screwed anything up. Thanks.
Comment 1 Brad Jorsch 2013-11-28 14:47:06 UTC
You need to specify a correct value for basetimestamp. Include timestamp in rvprop and use the timestamp of the revision as your value for basetimestamp.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links