Directory

⚓ T245781 Reply tool usually doesn't work in Safari
Page MenuHomePhabricator

Reply tool usually doesn't work in Safari
Closed, ResolvedPublic

Description

Usually, but not always, if I try to use the Reply tool on one of the target wikis, while logged in, in Safari, I get an error message that says "Invalid response from server" and the message does not get posted.

I see the Reply button, and I can type the message in the Reply tool. It just doesn't let me post the reply on the page.

There are no errors in the Javascript console.

Event Timeline

JTannerWMF moved this task from Inbox to High Priority on the Editing QA board.
JTannerWMF added subscribers: Ryasmeen, JTannerWMF.

@Ryasmeen can you verify that this is happening and up that the tickets of the steps you took to reproduce?

@Ryasmeen can you verify that this is happening and up that the tickets of the steps you took to reproduce?

yup, I can reproduce this. Followed the same steps @Whatamidoing-WMF mentioned, just trying to post a reply gives this error on Safari, but no error in the console.

Here is the screen capture:

Screen Shot 2020-02-25 at 11.21.06 AM.png (501×1 px, 150 KB)
JTannerWMF removed a project: Editing QA.

Talking to @Ryasmeen right now and this is ready for development

image.png (540×2 px, 115 KB)

Error's changed since this task was filed, and is now: "Could not find the comment you're replying to on the page. It might have been deleted or moved to another page. Please reload the page and try again."

This translates to !parsoidCommentsById[ commentId ] in controller.js/getParsoidCommentData. I'll investigate further.

So, it seems that in Safari findSignature always fails.

This is because of different behavior of getPageTitleFromUri( link.href ); -- in Safari link.href isn't being set to the fully-qualified URI, so we get "./Gebruiker:DLynch_(WMF)" instead of Chrome's "https://nl.wikipedia.org/wiki/Overleg_gebruiker:RYasmeen_(WMF)". This all seems to be down to how the parsoid response is being loaded as parsoidDoc = ve.createDocumentFromHtml( data.content ); which is failing to set the baseURI somehow.

@matmarex changed the place where this is being loaded in 711d5c4371f86f9b522bfce0731000e67eb7a45b so I'm not sure if the issue should still be happening.

Unfortunately I can't reproduce this failure locally even if I roll back to earlier code which is hurting my debugging, and I also can't reproduce it on beta (because restbase is down and everything fails regardless). As such, I'm going to wait until the train finishes going out tomorrow and see if I can still see this happening in production.

@DLynch If it still fails, then we should try using ve.fixBase, like in VisualEditor's code.

@matmarex Yeah, I have a patch for that locally which I made speculatively -- I just got held up on trying to prove to myself that it was making any sort of difference. That said, it probably shouldn't do anything bad to run fixBase, so I'll put it up for review anyway...

Change 576970 had a related patch set uploaded (by DLynch; owner: DLynch):
[mediawiki/extensions/DiscussionTools@master] controller: apply ve.fixBase to the parsed Parsoid response

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

Okay, it still fails on nlwiki now 1.35.0-wmf.22 has finished rolling out.

Change 576970 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] controller: apply ve.fixBase to the parsed Parsoid response

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

For QA purposes: because of the restbase issues on beta (T246833) I don't know whether this issue could be reproduced there before this patch. So we might have to wait for it to get to production before we can know.

Change 578364 had a related patch set uploaded (by Bartosz Dziewoński; owner: DLynch):
[mediawiki/extensions/DiscussionTools@wmf/1.35.0-wmf.22] controller: apply ve.fixBase to the parsed Parsoid response

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

Notes from today's, 9-March, stand-up:

We are going to SWAT this today. This means this patch can technically [1] be tested as soon as this afternoon (PST).

cc @Ryasmeen


  1. Emphasis on "technically" considering today is a staff holiday

Nobody was available to actually deploy the patches… I rescheduled it for tomorrow.

Change 578364 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@wmf/1.35.0-wmf.22] controller: apply ve.fixBase to the parsed Parsoid response

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

Mentioned in SAL (#wikimedia-operations) [2020-03-10T11:21:50Z] <lucaswerkmeister-wmde@deploy1001> Synchronized php-1.35.0-wmf.22/extensions/DiscussionTools/: SWAT: [[gerrit:578364|controller: apply ve.fixBase to the parsed Parsoid response (T245781)]] (duration: 00m 59s)

The fix is deployed now and ready for QA in production.

I can confirm that it no longer happens for me on https://nl.wikipedia.org/wiki/Overleg_gebruiker:RYasmeen_%28WMF%29/Kladblok?dtenable=1&debug=1 (after a moment of worry before I aggressively cleared some caches).