Page MenuHomePhabricator

In 'showTipsy' Uncaught TypeError: Cannot read property 'ownerDocument' of undefined
Closed, ResolvedPublic

Description

Seen on mediawiki.org
https://logstash.wikimedia.org/app/kibana#/dashboard/Reading-Web?_g=h@a7847a0&_a=h@dfd95ba
https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2020.06.16/clienterror?id=AXK9-V69ZmYAikdJytJn&_g=h@b62398b

at Object.OO.ui.Element.static.getRootScrollableElement  https://www.mediawiki.org/w/load.php?lang=it&modules=...&skin=minerva&version=1mcax:275:407
at Object.OO.ui.Element.static.getClosestScrollableContainer  https://www.mediawiki.org/w/load.php?lang=it&modules=...&skin=minerva&version=1mcax:276:193
at OoUiPopupWidget.OO.ui.mixin.FloatableElement.togglePositioning  https://www.mediawiki.org/w/load.php?lang=it&modules=...&skin=minerva&version=1mcax:315:93
at OoUiPopupWidget.OO.ui.PopupWidget.toggle  https://www.mediawiki.org/w/load.php?lang=it&modules=...&skin=minerva&version=1mcax:333:376
at showTipsy  https://www.mediawiki.org/w/load.php?lang=it&modules=...&skin=minerva&version=1mcax:81:817
at https://www.mediawiki.org/w/load.php?lang=it&modules=...&skin=minerva&version=1mcax:83:254

Replication steps

Relates to the showTipsy that shows after changing language.

Theory

There is no tipsy on Minerva and user is on preferences page where they can cancel any changes to language interface (when prompted click "stay on page"). Is it possible that somehow a tipsy is getting queued for Vector and then the user switches to Minerva?

Event Timeline

matmarex added a subscriber: matmarex.

I don't think this is related to VisualEditor.

The showTipsy method, which appears in the exception stack trace, is defined in UniversalLanguageSelector – it shows a little popup pointing to the button that opens ULS interface when you change your language. The URLs in the stack trace mention Minerva.

I made some educated guesses and found this way to reproduce a similar error (although it's not the exact same stacktrace): just visit https://www.mediawiki.org/wiki/MediaWiki?uselang=gom&useskin=minerva (or any 'uselang' other than your current language, while your skin is set to Minerva).

Uncaught TypeError: Cannot read property '0' of undefined
    at Object.OO.ui.Element.static.getDocument (load.php?lang=gom&modules=...&skin=minerva&version=1y7tr:592)
    at Object.OO.ui.Element.static.getClosestScrollableContainer (load.php?lang=gom&modules=...&skin=minerva&version=1y7tr:596)
    at OoUiPopupWidget.OO.ui.mixin.FloatableElement.togglePositioning (load.php?lang=gom&modules=...&skin=minerva&version=1y7tr:637)
    at OoUiPopupWidget.OO.ui.PopupWidget.toggle (load.php?lang=gom&modules=...&skin=minerva&version=1y7tr:655)
    at showTipsy (load.php?lang=gom&modules=...&skin=minerva&version=1y7tr:301)
    at load.php?lang=gom&modules=...&skin=minerva&version=1y7tr:303

The problem is that it's trying to display the popup next to the ULS button, but there isn't a ULS button in Minerva.

ppelberg added a subscriber: ppelberg.

Moving this to "Blocked" so we know to discuss where this ticket belongs considering what @matmarex found in T255625#6305934.

Jdlrobson renamed this task from Uncaught TypeError: Cannot read property 'ownerDocument' of undefined to In 'showTipsy' Uncaught TypeError: Cannot read property 'ownerDocument' of undefined.Jul 23 2020, 3:13 PM
Jdlrobson updated the task description. (Show Details)

Maybe this will be fixed by T259037

Probably not, as that link is a distinct from the main ULS dialog entry point.

Probably not, as that link is a distinct from the main ULS dialog entry point.

Ok, I cannot reproduce the issue by going to https://www.mediawiki.org/wiki/MediaWiki?uselang=gom&useskin=minerva. I tried a random page too. Do you think it's fixed or is there something I should do to see the error or to know the specific hook that needs to be disabled for minerva ?

Ammarpad assigned this task to Jdlrobson.

Nevermind. This has been fixed already by the fix in T237036