In theory, we perform an inexpensive 1-second granularity timestamp check to detect conflicts, then a second test is performed atomically during updateRevisionOn, which uses the actual revision ID of the article content that was used as the edit base. However, this atomic test is broken because getLatest is returning the *new* latest id rather than the oldid stored at the time the user opened the article edit page.
This can be easily confirmed by disabling the timestamp test at EditPage.php line 1613, opening two tabs, and editing then submitting in both. This allows you to simulate two edits occurring within one second of each other. The outcome will be a silently ignored edit conflict, and the second edit will overwrite the first.
One issue that jumps out immediately is that we were relying on the "oldid" hidden form parameter, but this always has a value of "0".
The edittime method has been deprecated by editRevId, so we can remove the parameter.
- T36423: Edit conflicts with yourself are not detected when doing no section edit - inconsistent behavior
- T44163: edit conflict sometimes does not show the current text - new text not loaded from master?
- T55446: Edit conflicts for editing different sections on popular article
- T58511: edit conflict offers old version to be edit
- T13922: Edit conflict not detected, middle edit reverted
- T66237: Warns about nonexistent edit conflicts
- T34037: API: Allow edit conflict detection based on revid