Last modified: 2014-11-08 20:15:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T69676, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 67676 - [WebFonts] Uncaught TypeError: Cannot read property 'replace' of undefined
[WebFonts] Uncaught TypeError: Cannot read property 'replace' of undefined
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UniversalLanguageSelector (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Niklas Laxström
:
Depends on:
Blocks: 39480
  Show dependency treegraph
 
Reported: 2014-07-08 16:14 UTC by Niklas Laxström
Modified: 2014-11-08 20:15 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Niklas Laxström 2014-07-08 16:14:41 UTC
Uncaught TypeError: Cannot read property 'replace' of undefined

Caused by:

overridableFontFamilies = $.map( overridableFontFamilies, function( item ) { return item.replace( /[\s'"]/g, '' ); } );

item is undefined because overridableFontFamilies contains undefined. It contains undefined because of:

overridableFontFamilies: [ $( 'h1' ).css( 'font-family' ) ]

This particular page does not have h1 element, so the call returns undefined.
Comment 1 Niklas Laxström 2014-07-08 16:16:12 UTC
Happens for example on the translatewiki.net main page.
Comment 2 Niklas Laxström 2014-11-06 07:13:58 UTC
Now also happens at Special:CX.
Comment 3 Gerrit Notification Bot 2014-11-08 10:50:35 UTC
Change 172022 had a related patch set uploaded by Nikerabbit:
Fix JavaScript error on pages without headings

https://gerrit.wikimedia.org/r/172022
Comment 4 Amir E. Aharoni 2014-11-08 20:10:01 UTC
Thanks a lot for the fix. I wondered whether something is broken on my end.
Comment 5 Gerrit Notification Bot 2014-11-08 20:15:01 UTC
Change 172022 merged by jenkins-bot:
Fix JavaScript error on pages without headings

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links