• This is for the plugin developers.

    I use Better WP Minify and unless I exclude the soundmanagers-nodebug.jsmin.js from being minified, combined and moved to the footer, I get an error in the browser console that soundManager is undefined.

    There are a few ways to overcome this, which may be combined for best results:

    1. Enqueue the code that is currently used inline. Other than setting one URL, I see no reason for this to be inline
    2. Make the code run on window load, by which time all the JavaScript sources will have run
    3. Set the priority of the action that writes the inline code to a high number, like 999, so that it appears further down the page than the minified scripts

    Thank you!

    https://ww.wp.xz.cn/plugins/compact-wp-audio-player/

Viewing 1 replies (of 1 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi, thank you for sharing your solution and reporting your findings. The plugin developers will investigate further your request.

    Kind regards

Viewing 1 replies (of 1 total)

The topic ‘Inline script error with minification plugin’ is closed to new replies.