Page MenuHomePhabricator

Sometimes Gadgets don't work on pages with a lot of <math> tag
Closed, DeclinedPublic

Description

I don't know how to help you reproduce this problem since it is not something that happens all the time. But I'll try :)

As I have noticed the problem is only on articles with a lot of <math> tags and it only appears when the Math mode is selected MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools).

For example try to edit the Աստիճան (հանրահաշիվ) article on hywiki. Even when editing small sections, sometimes gadgets don't load at all.

If my hardware/software info can help, I'm using Google Chrome 84.0.4147.125 on Windows 10 Home. My laptop has 8 GB ram and runs on AMD Ryzen 3 3200U with Radeon Vega Mobile Gtx. I don't know if this matters or not but, in any case, my internet download is 2.28 Mbps and upload is 0.63 Mbps.

Event Timeline

I believe it is because of the math tag since Ֆրանսիայի պատմություն is almost 4 times bigger but everything works fine.

Also VisualEditor doesn't work on this page.

Hi @Ashot1997, thanks for taking the time to report this! Please follow https://www.mediawiki.org/wiki/Help:Locating_broken_scripts in such cases.

Aklapper changed the task status from Open to Stalled.Aug 14 2020, 9:56 AM
Aklapper removed projects: Performance Issue, Math.

I don't see how this is performance related or related to Math if gadgets break, and the steps to reproduce are not fully clear.
When I use the standard WikiEditor the math tags are displayed; same when using VisualEditor (please look at https://www.mediawiki.org/wiki/Editor to see why it's important to clarify which exact editor software you use).
When I use VisualEditor on https://hy.wikipedia.org/w/index.php?title=Աստիճան_(հանրահաշիվ)&veaction=edit&debug=true it also renders all math forms.

You state that some gadgets don't work but you don't explain which gadgets.
Please always follow https://www.mediawiki.org/wiki/How_to_report_a_bug - thanks!

For both editors, when I look at the "network" tab of the Developer Tools, the autocomplete gadget is broken.
Do you use the autocomplete gadget? If yes, does the problem also happen when you disable that gadget?

Uncaught Error: module already implemented: ext.gadget.autocomplete
    implement https://hy.wikipedia.org/w/load.php?debug=true&lang=hy&modules=startup&only=scripts&raw=1&skin=vector:2055
    <anonymous> https://he.wikipedia.org/w/load.php?modules=ext.gadget.autocomplete:1
load.php:2055:13
    implement https://hy.wikipedia.org/w/load.php?debug=true&lang=hy&modules=startup&only=scripts&raw=1&skin=vector:2055
    <anonymous> https://he.wikipedia.org/w/load.php?modules=ext.gadget.autocomplete:1

Looking at https://hy.wikipedia.org/wiki/MediaWiki:Gadgets-definition you see that ext.gadget.autocomplete is listed in the line autocomplete[ResourceLoader|dependencies=jquery.ui,jquery.textSelection]|autocomplete.js
which means its code is located at https://hy.wikipedia.org/wiki/MediaWiki:Gadget-autocomplete.js

Hi @Aklapper, thanks for your comment. I don't think that this is because of some gadgets or user scripts since I tried disabling all of them and it is the same (with safemode too). I reported this after a friend said that she has the same problem. Besides, it is not like everything works until a bad script breaks, please see this screenshot

image.png (905×1 px, 276 KB)
.
Even WikiEditor doesn't load (I guess it should load before gadgets or userscripts).

Not some gadgets, all of them :)

@Ashot1997: I cannot reproduce. Please do follow https://www.mediawiki.org/wiki/Help:Locating_broken_scripts : Open an empty web browser tab, open the console of your web browser's developers tools, then go to https://hy.wikipedia.org/w/index.php?title=Աստիճան_(հանրահաշիվ)&action=edit&debug=true (note the debug=true), then wait until it has loaded, then look at the console tab in the developer tools (feel free to post a screenshot) plus the network tab if there are any errors. Thanks!

I understand that it looks like I'm making a big deal out of nothing but please watch this video for example https://youtu.be/VwMGg6Rle4I . This time I was lucky since it only took about 3 minutes till VisualEditor started to work (During that time I managed to show that I have no enabled gadgets, no user scripts on common.js or global.js and edit the second biggest article on hywiki with VisualEditor). Sometimes I wait more than 10 minutes but VisualEditor or WikiEditor don't appear. I'm guessing this is because of math tag since these kind of problems only happen on math-related articles.

This is not about "making a big deal". :)
It's about providing enough information that someone else can reproduce the problem.
@Ashot1997: Please see and follow my previous comment, follow the linked steps, and provide the output here. Otherwise nobody can do something to fix it.

Unfortunately closing this Phabricator task as no further information has been provided.

@Ashot1997: After you have provided the information asked for (following https://www.mediawiki.org/wiki/Help:Locating_broken_scripts and using debug=true) and if this still happens, please set the status of this task back to "Open" via the Add Action...Change Status dropdown. Thanks!