Page MenuHomePhabricator

Edit conflict preview not working on big pages
Closed, ResolvedPublic5 Story Points

Description

When you get an edit conflict on a bigger page the preview button does not work.

Steps to reproduce:

  1. Create an edit conflict (myself logged-in against myself as an IP) on a wikipage with much text.
  2. Click on Preview
  3. Nothing happens, no preview is shown.

This issue comes from the GET request to the API to generate the preview. On large pages the request is too long for GET and the server throws a 414 error. e.g.: Request

This might also be the problem behind https://www.mediawiki.org/wiki/Topic:Uun8oeocci3h79i7 ( still not investigated fully )

Acceptance Criteria

  • Independent of page size, we can show a preview

Notes
A big page means anything above 2000 Bytes.
This can probably be solved through using a POST request instead of GET

Related Objects

Event Timeline

Restricted Application added a project: TCB-Team. · View Herald TranscriptFeb 22 2019, 4:59 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JStrodt_WMDE updated the task description. (Show Details)Feb 22 2019, 5:03 PM
JStrodt_WMDE updated the task description. (Show Details)Feb 25 2019, 9:33 AM

This is the js error I get when I click the preview button:

GET https://de.wikipedia.org/w/api.php?action=parse&format=json&formatversion=2…anuell%20ersetzt%20werden%2E%0A%7C%7B%7BX%7D%7D%20nicht%20geplant%0A%7C%7D 414
WMDE-Fisch renamed this task from Preview button isn't working (no reaction) to Edit conflict preview not working on big pages.Feb 25 2019, 12:49 PM
WMDE-Fisch updated the task description. (Show Details)
Restricted Application added a subscriber: jeblad. · View Herald TranscriptFeb 25 2019, 12:49 PM

This is the js error I get when I click the preview button:

GET https://de.wikipedia.org/w/api.php?action=parse&format=json&formatversion=2…anuell%20ersetzt%20werden%2E%0A%7C%7B%7BX%7D%7D%20nicht%20geplant%0A%7C%7D 414

I just found out that this is related to big pages where the conflicts appear. So the reason behind this is quite straight forward. I updated the issue description accordingly.

Lea_WMDE updated the task description. (Show Details)Feb 26 2019, 2:15 PM
Lea_WMDE set the point value for this task to 5.
Alsee added a subscriber: Alsee.Feb 27 2019, 7:09 PM

I believe I just ran into this problem as well. I'd just like to note surprise at 2000 bytes being described as a big. At EnWiki that would be considered an extremely short page.

awight claimed this task.Apr 23 2019, 3:59 PM
awight moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2019-04-17 board.

Change 506005 had a related patch set uploaded (by Awight; owner: Adam Wight):
[mediawiki/core@master] Use POST to submit content as a request parameter

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

As you said, POST is all that we needed here. I got fancy and only POST when submitting content via a request parameter.

Change 506005 merged by jenkins-bot:
[mediawiki/core@master] Use POST to submit wikitext to mw.api.parse

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

Lea_WMDE closed this task as Resolved.May 8 2019, 8:56 AM
Lea_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2019-04-17 board.