wp.media.mixin in undefined error (media-audiovideo.js not loaded)
-
There’s an issue I’m seeing on a few customer sites, but can’t replicate on others nor our own, where it seems the media-audiovideo.js file is not being included or enqueued and then causes “Uncaught TypeError: wp.media.mixin is undefined” error when an image is selected in the media library, leaving the “Use this image” button disabled.
We have a Gravity Forms addon we’ve developed (it’s not here in the WordPress repo), which makes use of the media library and correctly calls wp_enqueue_media(); from within a ‘admin_enqueue_scripts’ action handler.
It seems everything else enqueued by wp_enqueue_media loads fine but for some reason not media-audiovideo.js specifically. There’s no script tag for it on page. The file exists and isn’t corrupted, and is present for example when editing a normal post. Just cannot figure out why.
Wondering (hoping!) somebody here might have an idea why.
As mentioned this doesn’t happen across the board, but it is recent and we’ve had it reported a handful of times over the last two weeks. The most recent case, the user had a fresh WordPress install, and the only plugins were Gravity Forms and our addon. The theme was Twenty Twenty One. I’ve tried the same setup but it works fine.
Can anybody help shed some light? ????
- The topic ‘wp.media.mixin in undefined error (media-audiovideo.js not loaded)’ is closed to new replies.