[wp-trac] [WordPress Trac] #42071: MediaElement upgrade causing JS errors when certain languages are in use

WordPress Trac noreply at wordpress.org
Tue Oct 3 12:06:11 UTC 2017


#42071: MediaElement upgrade causing JS errors when certain languages are in use
----------------------------------------+-------------------------
 Reporter:  johnbillion                 |      Owner:
     Type:  defect (bug)                |     Status:  new
 Priority:  normal                      |  Milestone:  4.9
Component:  External Libraries          |    Version:  trunk
 Severity:  major                       |   Keywords:  needs-patch
  Focuses:  javascript, administration  |
----------------------------------------+-------------------------
 MediaElement was upgraded in #39686.

 This change made in [41198] is causing JavaScript errors on the post
 editing screen when using the admin area in a language with a three-letter
 locale code, such as [https://translate.wordpress.org/locale/ary Moroccan
 Arabic].

 {{{
 Uncaught TypeError: Language code must have format `xx` or `xx-xx`
     at Object.s.language (mediaelement-and-
 player.min.js?ver=4.2.5-74e01a40:12)
     at Object.o.5.15 (mediaelement-and-
 player.min.js?ver=4.2.5-74e01a40:12)
     at i (mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12)
     at e (mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12)
     at mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12
 s.language @ mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12
 o.5.15 @ mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12
 i @ mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12
 e @ mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12
 (anonymous) @ mediaelement-and-player.min.js?ver=4.2.5-74e01a40:12
 wp-mediaelement.js?ver=4.9-alpha-40870-src:51
 }}}
 {{{
 Uncaught TypeError: $(...).not(...).filter(...).mediaelementplayer is not
 a function
     at HTMLDocument.initialize (wp-
 mediaelement.js?ver=4.9-alpha-40870-src:51)
     at i (jquery.js?ver=1.12.4:2)
     at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4:2)
     at Function.ready (jquery.js?ver=1.12.4:2)
     at HTMLDocument.K (jquery.js?ver=1.12.4:2)
 initialize @ wp-mediaelement.js?ver=4.9-alpha-40870-src:51
 i @ jquery.js?ver=1.12.4:2
 fireWith @ jquery.js?ver=1.12.4:2
 ready @ jquery.js?ver=1.12.4:2
 K @ jquery.js?ver=1.12.4:2
 wp-auth-check.js?ver=4.9-alpha-40870-src:101
 }}}
 {{{
 Uncaught TypeError: Cannot read property 'hasClass' of undefined
     at HTMLDocument.<anonymous> (wp-auth-
 check.js?ver=4.9-alpha-40870-src:101)
     at HTMLDocument.dispatch (jquery.js?ver=1.12.4:3)
     at HTMLDocument.r.handle (jquery.js?ver=1.12.4:3)
     at Object.trigger (jquery.js?ver=1.12.4:3)
     at Object.jQuery.event.trigger (jquery-migrate.js?ver=1.4.1:633)
     at HTMLDocument.<anonymous> (jquery.js?ver=1.12.4:3)
     at Function.each (jquery.js?ver=1.12.4:2)
     at jQuery.fn.init.each (jquery.js?ver=1.12.4:2)
     at jQuery.fn.init.trigger (jquery.js?ver=1.12.4:3)
     at Object.<anonymous> (heartbeat.js?ver=4.9-alpha-40870-src:400)
 }}}
 Seen in Chrome 61 on macOS. Git bisected back to [41198].

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42071>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list