[wp-trac] [WordPress Trac] #42574: MediaElement upgrade causing JS errors when certain languages are in use e.g de_DE-formal
WordPress Trac
noreply at wordpress.org
Mon Nov 20 18:51:50 UTC 2017
#42574: MediaElement upgrade causing JS errors when certain languages are in use
e.g de_DE-formal
-------------------------------------+-------------------------------------
Reporter: erich_k4wp | Owner:
Type: defect (bug) | Status: reopened
Priority: high | Milestone: 4.9.1
Component: Media | Version: 4.9
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses: javascript,
needs-testing | administration
-------------------------------------+-------------------------------------
Comment (by westonruter):
Here's a workaround plugin you can install which will allow the formal
locale to remain active:
{{{#!php
<?php
add_action( 'wp_default_scripts', function( \WP_Scripts $scripts ) {
$scripts->add_inline_script(
'mediaelement-core',
'mejsL10n.language = mejsL10n.language.replace(
/^(\w\w+[-_]\w\w).+/, "$1" );',
'before'
);
}, 11 );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42574#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list