Page MenuHomePhabricator

DiscussionTools' reply tool does not open after using Google Translate browser extension
Closed, ResolvedPublic

Description

Expected behavior

  1. Visit https://ar.wikipedia.org/wiki/%D9%86%D9%82%D8%A7%D8%B4:%D8%A7%D9%84%D8%B5%D9%81%D8%AD%D8%A9_%D8%A7%D9%84%D8%B1%D8%A6%D9%8A%D8%B3%D9%8A%D8%A9?dtenable=1
  2. Observe رد (reply) links are visible
  3. Using the Google Translate browser extension (in this case, Chrome), click "TRANSLATE THIS PAGE"
  4. Click on any of the the رد (reply) links.
  5. Observe that it opens the Reply tool without any error on the console.

Actual behavior

  1. Visit https://ar.wikipedia.org/wiki/%D9%86%D9%82%D8%A7%D8%B4:%D8%A7%D9%84%D8%B5%D9%81%D8%AD%D8%A9_%D8%A7%D9%84%D8%B1%D8%A6%D9%8A%D8%B3%D9%8A%D8%A9?dtenable=1
  2. Observe رد (reply) links are visible
  3. Using the Google Translate browser extension (in this case, Chrome), click "TRANSLATE THIS PAGE"

⚠️4. Observe the رد (reply) links are not visible

Reply tool does not work on ar wiki, getting Uncaught TypeError: Cannot read property 'closest' of null after clicking on "Reply" link

Screen Shot 2020-02-18 at 2.10.17 PM.png (802×1 px, 216 KB)

Event Timeline

It works for me on https://ar.wikipedia.org/wiki/نقاش:الصفحة_الرئيسية (this is the talk of the mainpage). Can you give a link to the broken page?

Actually this happens when I enable the translation, works fine otherwise. Still that error is probably worth investigating?

JTannerWMF subscribed.

We will not prioritize this right now, however, once we deploy the beta feature, we need to revisit this task to determine if it persists when translating the page.

20-Feb

  • Update the task description with Expected and Actual behavior.

I tried reproducing on https://translate.google.com/, but it insists on redirecting me to the mobile view, where DT is not available yet.

I generally wouldn't expect editing tools to work while viewing a translated page.

However, it's possible that this was fixed by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/570397 (the "null" in your error message is supposed to be an element generated from a Range). Can you re-test?

matmarex renamed this task from DiscussionTool does not work on ar wiki, getting Uncaught TypeError: Cannot read property 'closest' of null after clicking on "Reply" link to DiscussionTool does not work on ar wiki when using Google Translate browser extension.Feb 27 2020, 11:40 PM

I too wouldn't expect any of our products to work with plugins that extensively modify the DOM, so in the absence of community feedback that this is a common problem we should probably ignore it.

This is still broken, when I click on Reply link after using Google Translate browser extension, there is still no reply box and I am still getting the error in the console:

Uncaught TypeError: Cannot read property 'closest' of null after clicking on "Reply" link

Esanders lowered the priority of this task from High to Lowest.Mar 17 2020, 2:13 PM

Let's not spend spend more time on this, we can't realistically support a plugin like Google Translate that makes huge changes to the DOM.

This is still broken, when I click on Reply link after using Google Translate browser extension, there is still no reply box and I am still getting the error in the console:

Uncaught TypeError: Cannot read property 'closest' of null after clicking on "Reply" link

@Ryasmeen, it sounds like [1] you're running into this issue semi-frequently which leads me to wonder: how is the issue making it more difficult for you to test the replying workflow on non-English wikis?


  1. T245563#5974412

Let's not spend spend more time on this, we can't realistically support a plugin like Google Translate that makes huge changes to the DOM.

I'm totally fine with it :) This was not fixed but still was put in the high priority QA column, so I had to test it.

This is still broken, when I click on Reply link after using Google Translate browser extension, there is still no reply box and I am still getting the error in the console:

Uncaught TypeError: Cannot read property 'closest' of null after clicking on "Reply" link

@Ryasmeen, it sounds like [1] you're running into this issue semi-frequently which leads me to wonder: how is the issue making it more difficult for you to test the replying workflow on non-English wikis?


  1. T245563#5974412
  1. No...this is not a semi frequent issue. Not sure why you think that :)
  2. This was not relevant to me facing difficulty testing the replying workflow. It was about whether not seeing any Reply box after clicking on Reply link is acceptable (when using Google Translate extension)

Let's make a decision on that and close this.

  1. This was not relevant to me facing difficulty testing the replying workflow. It was about whether not seeing any Reply box after clicking on Reply link is acceptable (when using Google Translate extension)

Oh, ok.

Let's make a decision on that and close this.

Let's put this in the freezer.

BTW.. there is ways for websites to disable google translator on blocks or even the entire html element.

sprinkling this everywhere in MediaWiki would seem problematic too though

matmarex renamed this task from DiscussionTool does not work on ar wiki when using Google Translate browser extension to DiscussionTool does not work when using Google Translate browser extension.Oct 1 2021, 12:24 AM

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

[mediawiki/extensions/DiscussionTools@master] Make reply links more robust so Google Translate won't break us

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

Esanders renamed this task from DiscussionTool does not work when using Google Translate browser extension to DiscussionTools' reply tool does not open after using Google Translate browser extension.Oct 4 2021, 11:24 AM

I have tested this and the issues seems to have been fixed as shown in the attached image. The reply link shows up, and the error is gone.

Screenshot 2021-10-07 at 17.52.39.png (1×3 px, 414 KB)

The issue I encounter is as shown below: After the page has been translated, Reply link throws an error when clicked

Screenshot 2021-10-07 at 18.00.41.png (1×3 px, 598 KB)

The patch isn't deployed to production wikis yet, the change will only take effect after the 1.38.0-wmf.4 deployment (2021-10-12 to 2021-10-14, per the usual schedule).

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

[mediawiki/extensions/DiscussionTools@master] Make reply links more robust so Google Translate won't break us

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

(This patch was merged on 5 October, but the bot didn't report that here for some reason.)

I have looked and it works fine now.
Before the [to relpy] link is clicked

Screenshot 2021-10-18 at 15.11.51.png (428×3 px, 204 KB)

After the [to reply] link is clicked
Screenshot 2021-10-18 at 14.56.39.png (746×3 px, 199 KB)

TheDJ removed a project: Patch-For-Review.