Page MenuHomePhabricator

TypeError: window.print is not a function
Closed, ResolvedPublicBUG REPORT

Description

Noticed this error in logstash. It seems that some UAs do not support print. Thus throwing a TypeError when this function is called from: resources/src/mediawiki.page.ready/ready.js or minerva's resources/skins.minerva.scripts/downloadPageAction.js

Observer for UA: Mozilla/5.0 (Android 10; Mobile; rv:91.0) Gecko/91.0 Firefox/91.0

Error rate: 68 every 7 days
https://logstash.wikimedia.org/goto/e4f97610998e04be09b3f20f8c0cecf8

Event Timeline

Jdlrobson subscribed.

I can confirm some browsers disobey the spec here and leave it undefined. I thought we were checking that but I guess not.

Jdlrobson added a project: patch-welcome.
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from Incoming to Needs Prioritization (Tech) on the Web-Team-Backlog board.

Change 883251 had a related patch set uploaded (by Ammarpad; author: Ammarpad):

[mediawiki/skins/MinervaNeue@master] Don't show download button if there's no window.print

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

Change 883251 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Don't show download button if there's no window.print

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

TheDJ assigned this task to Ammarpad.