Page MenuHomePhabricator

Visual diff of page creation fails with “Invalid response from server”
Closed, ResolvedPublicBUG REPORT

Description

Steps to reproduce

  1. Open a “diff” showing a page creation. E.g. https://de.wikipedia.beta.wmflabs.org/w/index.php?title=Wikipedia:Hauptseite&diff=1851
  2. Try to switch to visual diff.

Actual result

  1. The visual diff fails with “Invalid response from server” message.

Expected result

  1. Either the visual diff button doesn’t appear at all, or it works (sort of – at the very least, it allows switching without an error message).

Software version

Beta cluster, VisualEditor ed3f643

Event Timeline

matmarex subscribed.

This revision seems to suffer from some problem unrelated to visual diffs. If you try to open it in visual editor, you get an error too (https://incubator.wikimedia.beta.wmflabs.org/w/index.php?title=User_talk:Tacsipacsi&veaction=edit).

Untimately both issues are because https://incubator.wikimedia.beta.wmflabs.org/api/rest_v1/page/html/User_talk%3ATacsipacsi/45 returns a HTTP 404 error. This looks like RESTBase isn't configured there. Is beta Incubator newly created, or something?

Either someone needs to figure that out, or we need to switch this wiki to the new RESTBase-free configuration.

Sorry, I was so certain that it’s because of the new page creation that I didn’t test further. Beta Incubator is not that young, it was created over a year ago: T210492.

Although having oldid 45 after more than a year shows how much it’s used for testing…

matmarex renamed this task from Visual diff of page creation fails with “Invalid response from server” to Visual diff on beta Incubator fails with “Invalid response from server”.Jun 9 2023, 4:52 PM

Change 928879 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[operations/mediawiki-config@master] Switch VisualEditor to not use RESTBase on beta cluster

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

matmarex moved this task from To Triage to Triaged on the VisualEditor board.

Change 928879 abandoned by Bartosz Dziewoński:

[operations/mediawiki-config@master] Switch VisualEditor to not use RESTBase on beta cluster

Reason:

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

matmarex renamed this task from Visual diff on beta Incubator fails with “Invalid response from server” to Visual diff of page creation fails with “Invalid response from server”.Jun 10 2023, 2:02 PM
matmarex updated the task description. (Show Details)

Okay, so the broken RESTBase on beta Incubator is an unrelated problem. Something has changed in our code. In production, the visual diff interface is not loaded at all on page creation "diffs", e.g. https://en.wikipedia.org/w/index.php?title=The_Fighting_Temeraire&diff=22970084

Probably rEVED137124a837be: Move the diff-mode selector to the new TextSlotDiffRendererTablePrefix hook (T324759: Inline Diff: Add legend and tooltips)?

Change 928989 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Don't offer visual diffs for page creation

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

(By the way, there are many tasks that describe the current behavior of wikitext page creation diffs as a bug, but they can't agree on what is the expected behavior: T55299, T214985, T314234.)

The patch disables the Visual option. I just want to check before merging if this is the desired behaviour since the Expected result describes hiding this option.

Screenshot from 2023-06-12 23-00-59.png (344×1 px, 43 KB)
Thank you!

I think it's acceptable and it was easier to implement. It seems to me that the behavior in this case is not that important, as long as it doesn't display errors to the user. I can change the patch if you (or anyone else) thinks that another behavior would be better.

In my view the real problem is that we're displaying the diff interface when there's no revision to compare to. No matter what we do about the visual diff interface, it won't make sense anyway.

I think it's acceptable and it was easier to implement. It seems to me that the behavior in this case is not that important, as long as it doesn't display errors to the user. I can change the patch if you (or anyone else) thinks that another behavior would be better.

In my view the real problem is that we're displaying the diff interface when there's no revision to compare to. No matter what we do about the visual diff interface, it won't make sense anyway.

100%. Merging. I just wanted to document that the solution is disabling the Visual option. Thank you for the context :)

Change 928989 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Don't offer visual diffs for page creation

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