Title: Bug in wp_enqueue_script filter
Last modified: August 20, 2016

---

# Bug in wp_enqueue_script filter

 *  Resolved [Jeffery Moore](https://wordpress.org/support/users/jeffydaboy/)
 * (@jeffydaboy)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/bug-in-wp_enqueue_script-filter/)
 * Great plugin! I just found a bug however:
 * When calling an external script, like “[https://maps.googleapis.com/maps/api/js?sensor=false&#8221](https://maps.googleapis.com/maps/api/js?sensor=false&#8221);,
   the option “Display random version number to all non-administrative users” being
   enabled can cause the script path to become truncated. The example URL given 
   above becomes: “[https://maps.googleapis.com/maps/api/js&#8221](https://maps.googleapis.com/maps/api/js&#8221);.
 * [http://wordpress.org/extend/plugins/better-wp-security/](http://wordpress.org/extend/plugins/better-wp-security/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Jeffery Moore](https://wordpress.org/support/users/jeffydaboy/)
 * (@jeffydaboy)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/bug-in-wp_enqueue_script-filter/#post-3150847)
 * Nevermind, I just found this bug reported elsewhere. My bad.
 *  [funkolector](https://wordpress.org/support/users/funkolector/)
 * (@funkolector)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/bug-in-wp_enqueue_script-filter/#post-3151096)
 * Hey,
 * where exactly did you see this bug reported?
    Any resolutions?
 * Thanks in advance.
 * A.
 *  Thread Starter [Jeffery Moore](https://wordpress.org/support/users/jeffydaboy/)
 * (@jeffydaboy)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/bug-in-wp_enqueue_script-filter/#post-3151097)
 * [http://wordpress.org/support/topic/plugin-better-wp-security-random-version-number-tweak-strips-all-script-query-parameter](http://wordpress.org/support/topic/plugin-better-wp-security-random-version-number-tweak-strips-all-script-query-parameter)
 * Not sure where I originally saw it but I found this post that reports the issue
   and provides a fix as well. I haven’t tried it myself but reading the code, it
   looks like it should work.
 * I might suggest trying to find a way to add this into your theme’s functions.
   php file instead of modifying the plugin code since an upgrade to it could undo
   your changes and re-introduce the bug.
 *  [funkolector](https://wordpress.org/support/users/funkolector/)
 * (@funkolector)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/bug-in-wp_enqueue_script-filter/#post-3151098)
 * Thanks for your answer Jeffery.
    And by the way, believe me, its been a long 
   time since i stopped modifying core file 😉

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Bug in wp_enqueue_script filter’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=3529351)
 * [Kadence Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [funkolector](https://wordpress.org/support/users/funkolector/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/bug-in-wp_enqueue_script-filter/#post-3151098)
 * Status: resolved