WE-Framework icon indicating copy to clipboard operation
WE-Framework copied to clipboard

JavaScript errors in ru:Vlsergey/wef.js

Open jdlrobson opened this issue 4 years ago • 5 comments

Apologies if this is the wrong place. I posted this on the talk page but got no response so trying here. The script at https://ru.wikipedia.org/wiki/%D0%9E%D0%B1%D1%81%D1%83%D0%B6%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA%D0%B0:Vlsergey/wef.js is generating a high volume of errors consisently.

I am seeing quite a few errors in our error logs relating to this error namely:

Error: Unknown entity type: на смену! Uncaught TypeError: Cannot read property 'cloneNode' of undefined TypeError: e is undefined

Because the script is minified I am not getting useful stack traces. I hope with this information you can track down these errors and help fix them.

Side note: Would you consider modifying Участник:Vlsergey/wef.js to be unminified and pointing to its source code on wiki. It was hard to find this.

jdlrobson avatar Jan 05 '21 01:01 jdlrobson

@jdlrobson , what page (URL) error is generated at?

vlsergey avatar Jan 05 '21 06:01 vlsergey

Looking at the logs today I see the following errors 1)Uncaught TypeError: Cannot read property 'cloneNode' of undefined (on Monobook skin) on https://ru.wikipedia.org/wiki/%D0%AD%D1%81%D1%82%D0%B0%D1%84%D0%B5%D1%82%D0%B0_%D0%BE%D0%BB%D0%B8%D0%BC%D0%BF%D0%B8%D0%B9%D1%81%D0%BA%D0%BE%D0%B3%D0%BE_%D0%BE%D0%B3%D0%BD%D1%8F_%D0%BB%D0%B5%D1%82%D0%BD%D0%B8%D1%85_%D0%9E%D0%BB%D0%B8%D0%BC%D0%BF%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D1%85_%D0%B8%D0%B3%D1%80_2016

also occured on Vector skin on this page: https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%9A_%D1%83%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%B8%D1%8E

at URL1:2:1327548
at fire  URL2:46:209
at Object.fireWith [as resolveWith]  URL2:47:402
at Object.deferred.<computed> [as resolve]  URL2:50:900
at <anonymous>:567:734
at Object.enqueue  URL3:11:947
at Object.mw.loader.using  <anonymous>:567:693
at Module.<anonymous>  URL1:2:1327368
at n  URL1:2:110
at URL1:2:902

URL1: https://ru.wikipedia.org/w/index.php?title=User:Vlsergey/wef.js&action=raw&ctype=text/javascript
URL2: https://ru.wikipedia.org/w/load.php?lang=ru&modules=jquery%2Coojs-ui-core%2Coojs-ui-widgets%7Cjquery.ui&skin=monobook&version=1jw6p
URL3: https://ru.wikipedia.org/w/load.php?lang=ru&modules=startup&only=scripts&raw=1&skin=monobook


  1. e is undefined occurred on https://ru.wikipedia.org/wiki/%D0%9D%D0%B5%D0%BC%D0%B5%D1%86%D0%BA%D0%B0%D1%8F_%D0%BA%D1%83%D1%85%D0%BD%D1%8F (Monobook skin with responsive option enabled)

Stack trace:

at URL1:2:1327546
at fire URL2:171:209
at fireWith URL2:172:402
at Deferred/</deferred[tuple[0]] URL2:175:900
at mediawiki.base.js/</mw.loader.using/< URL2:979:734
at enqueue URL3:11:947
at mediawiki.base.js/</mw.loader.using URL2:979:693
at URL1:2:1327368
at n URL1:2:110
at URL1:2:902
at URL1:2:914

URL1: https://ru.wikipedia.org/w/index.php?title=User:Vlsergey/wef.js&action=raw&ctype=text/javascript
URL2: https://ru.wikipedia.org/w/load.php?lang=ru&modules=ext.categoryTree%2CeventLogging%2CnavigationTiming%2CwikimediaEvents%7Cext.centralNotice.choiceData%2CgeoIP%2CstartUp%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.cite.ux-enhancements%7Cext.cx.eventlogging.campaigns%7Cext.echo.api%2Cinit%7Cext.flaggedRevs.advanced%7Cext.growthExperiments.SuggestedEditSession%7Cext.quicksurveys.init%2Clib%7Cext.uls.interface%2Cpreferences%2Cwebfonts%7Cjquery%2Coojs%2Coojs-router%2Coojs-ui-core%2Coojs-ui-widgets%2Coojs-ui-windows%2Csite%7Cjquery.client%2Ccookie%2CtextSelection%2Cui%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cstorage%2Ctoc%2Cuser%2Cutil%2Cviewport%7Cmediawiki.ForeignApi.core%7Cmediawiki.editfont.styles%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.ui.button%2Cicon%7Cmmv.bootstrap%2Chead%7Cmmv.bootstrap.autostart%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Cskins.monobook.mobile%7Cuser.defaults&skin=monobook&version=140ym
URL3: https://ru.wikipedia.org/w/load.php?lang=ru&modules=startup&only=scripts&raw=1&skin=monobook

Let me know if you need more examples, and thanks for looking into this!!

jdlrobson avatar Jan 05 '21 17:01 jdlrobson

@jdlrobson , sadly i'm unable to repeat specified problems on any of those URLs. I will describe a bit later how to "debug" WEF code on local machine (without uploading 10 Mb source file to wikipedia)

vlsergey avatar Jan 07 '21 22:01 vlsergey

Some more errors today from the following URIs:

  • https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:ContentTranslation
  • https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:ContentTranslation
  • https://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:ContentTranslation#draft
  • https://ru.wikipedia.org/w/index.php?title=%D0%9E%D0%B1%D1%81%D1%83%D0%B6%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5_%D1%83%D1%87%D0%B0%D1%81%D1%82%D0%BD%D0%B8%D0%BA%D0%B0:Alex_NB_IT&diff=111561599&oldid=111561565&diffmode=source
  • https://ru.wikipedia.org/w/index.php?title=%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:%D0%A1%D0%BF%D0%B8%D1%81%D0%BE%D0%BA_%D0%BD%D0%B0%D0%B1%D0%BB%D1%8E%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F&hidemyself=1&hidebots=1&hidecategorization=1&limit=500&days=7&enhanced=1&damaging__likelybad_color=c4&damaging__verylikelybad_color=c5&urlversion=2

jdlrobson avatar Jan 08 '21 19:01 jdlrobson

I can replicate the TypeError: e is undefined at this URL: https://ru.wikipedia.org/w/index.php?title=%D0%9A%D1%80%D1%83%D0%B7%D0%B5%D0%BD%D1%88%D1%82%D0%B5%D1%80%D0%BD,%D0%98%D0%B2%D0%B0%D0%BD%D0%A4%D1%91%D0%B4%D0%BE%D1%80%D0%BE%D0%B2%D0%B8%D1%87&action=edit&useskin=minerva

Hope that helps get to the bottom of this...

jdlrobson avatar Apr 21 '21 04:04 jdlrobson