To reproduce:
- Open JS console
- Go to https://en.m.wikipedia.org/wiki/Main_Page?debug=true
Observed:
cleanuptemplates.js?4ad4e:54 Uncaught TypeError: Cannot read property 'find' of null
at createBanner (cleanuptemplates.js?4ad4e:54)
at initPageIssues (cleanuptemplates.js?4ad4e:104)
at cleanuptemplates.js?4ad4e:117
at cleanuptemplates.js?4ad4e:118
at cleanuptemplates.js?4ad4e:120
createBanner @ cleanuptemplates.js?4ad4e:54
initPageIssues @ cleanuptemplates.js?4ad4e:104
(anonymous) @ cleanuptemplates.js?4ad4e:117
(anonymous) @ cleanuptemplates.js?4ad4e:118
(anonymous) @ cleanuptemplates.js?4ad4e:120This happens in this code in cleanuptemplates.js:
function createBanner( $container, labelText, headingText ) {
var selector = 'table.ambox, table.tmbox, table.cmbox',
$metadata = $container.find( selector ), // <----- HERE
issues = [],
$link;This happens consistently:
- in Chrome and Firefox
- logged-in and logged-out
- with debug=true and without it
- in English and Hebrew Wikipedias, but only on the Main Page. I couldn't consistently reproduce it in the German Wikipedia or in English Wikipedia articles other than the Main Page.