Title: Inline script error with minification plugin
Last modified: September 1, 2016

---

# Inline script error with minification plugin

 *  [Gal Baras](https://wordpress.org/support/users/galbaras/)
 * (@galbaras)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/inline-script-error-with-minification-plugin/)
 * 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://wordpress.org/plugins/compact-wp-audio-player/](https://wordpress.org/plugins/compact-wp-audio-player/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * (@mbrsolution)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/inline-script-error-with-minification-plugin/#post-7479091)
 * 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.

 * ![](https://ps.w.org/compact-wp-audio-player/assets/icon-128x128.png?rev=994411)
 * [Compact WP Audio Player](https://wordpress.org/plugins/compact-wp-audio-player/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/compact-wp-audio-player/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/compact-wp-audio-player/)
 * [Active Topics](https://wordpress.org/support/plugin/compact-wp-audio-player/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/compact-wp-audio-player/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/compact-wp-audio-player/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [mbrsolution](https://wordpress.org/support/users/mbrsolution/)
 * Last activity: [9 years, 11 months ago](https://wordpress.org/support/topic/inline-script-error-with-minification-plugin/#post-7479091)
 * Status: not resolved