Page MenuHomePhabricator

[wmf.20] mobile Special:Preferences section pages display "Cannot read properties of undefined (reading 'scrollIntoView')"
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. On mobile login to testwiki wmf.20 (or enwiki betalabs) and click on Settings to get to the Special:Preferences page.
  2. If Advanced mode is enabled, click on Open preferences link under User preferences:

Screen Shot 2023-01-25 at 2.16.45 PM.png (1×808 px, 155 KB)

  1. The page Special:Preferences will be displayed.
  2. Click on any of the group of preferences, e.g. User profile

The following Console error will be displayed:
Uncaught TypeError: Cannot read properties of undefined (reading 'scrollIntoView')

Note:

  • the error is displayed in betacluster and in testwiki wmf.20. The error is not present in wmf.19.

Event Timeline

This doesn't seem to relate to web team work. I've added the more appropriate team.

This happens on both mobile and desktop site and is significant enough to appear in production error logs e.g. Find reqId in Logstash

351 errors in the last 12 hours.
https://gerrit.wikimedia.org/g/mediawiki/core/+/24bbce386cd6ecd79cbb72dc9b699499480d160f/resources/src/mediawiki.special.preferences.ooui/mobile.js#17

Change 884963 had a related patch set uploaded (by Jsn.sherman; author: Jsn.sherman):

[mediawiki/core@master] Special:Preferences fix production JS error

https://gerrit.wikimedia.org/r/884963

I ommited a guard clause in the mobile layout that I added in the tabbed layout; the attached patch prevents the error.

Test wiki created on Patch demo by JSherman (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/a974a7c002/w

Aklapper renamed this task from [wmf.20] mobile Special:Preferences section paages display "Cannot read properties of undefined (reading 'scrollIntoView')" to [wmf.20] mobile Special:Preferences section pages display "Cannot read properties of undefined (reading 'scrollIntoView')".Jan 30 2023, 5:22 PM

Change 884963 merged by jenkins-bot:

[mediawiki/core@master] Special:Preferences fix production JS error

https://gerrit.wikimedia.org/r/884963

Not seeing any console errors in production now.

Test wiki on Patch demo by JSherman (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/a974a7c002/w/