TypeError: Cannot read property 'isUserInCondition' of undefined(…)
load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:176 TypeError: Cannot read property 'isUserInCondition' of undefined TypeError: Cannot read property 'isUserInCondition' of undefined(…)log @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:176handler @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:153fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:45fireWith @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:46fire @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:46track @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:153runScript @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:161checkCssHandles @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:161execute @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:162implement @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:168(anonymous function) @ VM851:1(anonymous function) @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:4globalEval @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:4iterate @ load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=0oyf810:166
Very hard to reproduce, but I've seen it a few times.
Seems like mw.popups.experiment is sometimes not defined when resources/ext.popups.core.js#mw.popups.getEnabledState is invoked. Looking at extension.json:
- ext.popups.core has the script resources/ext.popups.core.js which calls mw.popups.experiment.isUserInCondition
- ext.popups.experiment
- has the script resources/ext.popups.experiment.js that defines mw.popups.experiment.isUserInCondition
- has ext.popups.core in its dependencies
- ext.popups.targets.desktopTarget which lists first ext.popups.core and then ext.popups.experiment in its dependencies
- ext.popups.schemaPopups.utils which lists first ext.popups.experiment and then ext.popups.core in its dependencies
- gets loaded from a hook
Looking at the code, if the ext.popups.core module is loaded before mw.popups.experiment it could cause the above error which might break the feature and interfere with event logging as the property popupEnabled uses mw.popups.getEnabledState() which uses isUserInCondition. If this required value was undefined this would lead to dropped events. (cc @Tbayer )