Page MenuHomePhabricator

TypeError: str is undefined at byteLength
Closed, InvalidPublicPRODUCTION ERROR

Description

Error

MediaWiki version: n/a

message
TypeError: str is undefined

Impact

Notes

Details

Request URL
n/a
Stack Trace
exception.trace
at byteLength URL1:1103:593
at trimLength URL1:1103:1192
at trimByteLength URL1:1104:815
at enforceLimit URL1:766:225
at lengthLimit/</< URL1:766:484
at dispatch URL1:93:703
at add/elemData.handle URL1:90:359

URL1: https://ar.wikipedia.org/w/load.php?lang=ar&modules=dompurify%2Cjquery%2Coojs%2Coojs-ui%2Coojs-ui-core%2Coojs-ui-toolbars%2Coojs-ui-widgets%2Coojs-ui-windows%2Cpapaparse%2Crangefix%2Csite%2Cspark-md5%2Cunicodejs%7Cext.centralNotice.geoIP%7Cext.centralauth.ForeignApi%7Cext.centralauth.centralautologin.clearcookie%7Cext.cx.entrypoints.contributionsmenu%7Cext.cx.eventlogging.campaigns%7Cext.cx.widgets.callout%7Cext.echo.api%2Cinit%7Cext.eventLogging%2CnavigationTiming%2Cpopups%2CwikimediaEvents%7Cext.uls.common%2Ccompactlinks%2Cinterface%2Cpreferences%2Cwebfonts%7Cjquery.client%2Ccookie%2ClengthLimit%2CtextSelection%2Ctipsy%2Cui%7Cjquery.uls.data%7Cmediawiki.ForeignApi%2CString%2CTitle%2CUri%2Capi%2Cbase%2Ccldr%2Ccookie%2Cexperiments%2CjqueryMsg%2Clanguage%2Cmisc-authed-ooui%2Cstorage%2Cuser%2Cutil%2Cwidgets%7Cmediawiki.ForeignApi.core%7Cmediawiki.editfont.styles%7Cmediawiki.htmlform.ooui%7Cmediawiki.libs.pluralruleparser%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.ui.button%7Cmediawiki.widgets.visibleLengthLimit%7Coojs-ui-toolbars.icons%7Coojs-ui-widgets.icons%7Coojs-ui-windows.icons%7Coojs-ui.styles.icons-content%7Cskins.vector.legacy.js%7Cuser.defaults&skin=vector&version=c05xr

Event Timeline

This is obviously not a bug in byteLength, it's a bug in whatever is calling byteLength with undefined as the argument. This bug report isn't very useful like that.

The issue is caused by this script: https://ar.wikipedia.org/wiki/ميدياويكي:Gadget-decodesummary.js

I'm not sure what exactly it does. But this part is the problem:

    var fields = '#wpSummary, #wpReason, [name=wpReason], #mwProtect-reason, #mw-input-wpReason-other, #wpComment, .mw-ui-input.summary, #mw-input-reason > .oo-ui-inputWidget-input';
    $(fields).one('paste keyup change', function () {
    	if ( $(fields).byteLimit ) {
	        $(fields).byteLimit(Infinity);
    	}
    });

On Special:MovePage, #wpReason is a <div> node, and the code fails because it doesn't have a .value property.

Since this relates to a gadget, I'm closing as invalid. Will follow up on wiki.