Title: JS errors in admin
Last modified: March 12, 2018

---

# JS errors in admin

 *  Resolved [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * (@benjaminniess)
 * [8 years ago](https://wordpress.org/support/topic/js-errors-in-admin/)
 * Hi,
 * Your plugin crashes in admin due to the ads you add in the utility.php
 * Just replace
 * `jQuery.noConflict(true);`
 * with
 * `jQuery.noConflict();`
 * Thanks

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

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [8 years ago](https://wordpress.org/support/topic/js-errors-in-admin/#post-10065943)
 * Can you provide more information and/or screenshots about these crashes?
 * The line(s) in question are both parts of Mailchimp embed codes, for what it’s
   worth.
 *  Thread Starter [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * (@benjaminniess)
 * [8 years ago](https://wordpress.org/support/topic/js-errors-in-admin/#post-10066019)
 * Hi Michael,
 * Yes it’s linked to the mailchimp section.
 * Here is the beginning of the errors. they only appears on the CPT UI settings
   page :
 *     ```
       Refused to load the script 'http://s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.google.com https://apis.google.com https://maps.googleapis.com https://www.googletagmanager.com https://www.google-analytics.com https://cdnjs.cloudflare.com https://cdn.polyfill.io https://s7.addthis.com".
   
       hoverIntent.js?ver=1.8.1:33 Uncaught TypeError: Cannot read property 'fn' of undefined
           at hoverIntent.js?ver=1.8.1:33
           at hoverIntent.js?ver=1.8.1:115
       (anonymous) @ hoverIntent.js?ver=1.8.1:33
       (anonymous) @ hoverIntent.js?ver=1.8.1:115
       common.js:4 Uncaught TypeError: $ is not a function
           at common.js:4
           at common.js:1152
       (anonymous) @ common.js:4
       (anonymous) @ common.js:1152
       svg-painter.js:14 Uncaught TypeError: $ is not a function
           at svg-painter.js:14
           at svg-painter.js:240
       (anonymous) @ svg-painter.js:14
       (anonymous) @ svg-painter.js:240
       heartbeat.js:31 Uncaught TypeError: $ is not a function
           at new Heartbeat (heartbeat.js:31)
           at heartbeat.js:755
           at heartbeat.js:757
       Heartbeat @ heartbeat.js:31
       (anonymous) @ heartbeat.js:755
       (anonymous) @ heartbeat.js:757
       wp-auth-check.js:96 Uncaught TypeError: $ is not a function
           at wp-auth-check.js:96
           at wp-auth-check.js:117
       (anonymous) @ wp-auth-check.js:96
       (anonymous) @ wp-auth-check.js:117
       media-models.js:306 Uncaught TypeError: $ is not a function
           at Object.20 (media-models.js:306)
           at __webpack_require__ (media-models.js:20)
           at 20.$ (media-models.js:63)
           at media-models.js:66
       20 @ media-models.js:306
       __webpack_require__ @ media-models.js:20
       20.$ @ media-models.js:63
       (anonymous) @ media-models.js:66
       wp-plupload.js:321 Uncaught TypeError: Cannot read property 'extend' of undefined
           at wp-plupload.js:321
           at wp-plupload.js:425
       (anonymous) @ wp-plupload.js:321
       (anonymous) @ wp-plupload.js:425
       sortable.min.js?ver=1.11.4:11 Uncaught TypeError: Cannot read property 'widget' of undefined
           at sortable.min.js?ver=1.11.4:11
           at sortable.min.js?ver=1.11.4:11
           at sortable.min.js?ver=1.11.4:11
       (anonymous) @ sortable.min.js?ver=1.11.4:11
       (anonymous) @ sortable.min.js?ver=1.11.4:11
       (anonymous) @ sortable.min.js?ver=1.11.4:11
       wp-mediaelement.js:80 Uncaught TypeError: $ is not a function
           at wp-mediaelement.js:80
           at wp-mediaelement.js:82
       (anonymous) @ wp-mediaelement.js:80
       (anonymous) @ wp-mediaelement.js:82
       api-request.js:82 Uncaught TypeError: Cannot read property 'ajax' of undefined
           at api-request.js:82
           at api-request.js:87
       (anonymous) @ api-request.js:82
       (anonymous) @ api-request.js:87
       media-views.js:87 Uncaught TypeError: Cannot read property 'support' of undefined
           at Object.Array.concat.Region (media-views.js:87)
           at __webpack_require__ (media-views.js:20)
           at media-views.js:63
           at media-views.js:66
       Array.concat.Region @ media-views.js:87
       __webpack_require__ @ media-views.js:20
       (anonymous) @ media-views.js:63
       (anonymous) @ media-views.js:66
       media-editor.js:713 Uncaught TypeError: $ is not a function
           at media-editor.js:713
           at media-editor.js:1058
       (anonymous) @ media-editor.js:713
       (anonymous) @ media-editor.js:1058
       media-audiovideo.js:419 Uncaught TypeError: Cannot read property 'extend' of undefined
           at Object.State (media-audiovideo.js:419)
           at __webpack_require__ (media-audiovideo.js:20)
           at Object.Backbone.Model.extend.initialize (media-audiovideo.js:342)
           at __webpack_require__ (media-audiovideo.js:20)
           at media (media-audiovideo.js:63)
           at media-audiovideo.js:66
       ```
   
 * and it goes on and on…
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [8 years ago](https://wordpress.org/support/topic/js-errors-in-admin/#post-10066095)
 * Thanks, we’ll evaluate, test, see if we can recreate, and go from there. For 
   the moment, feel free to edit the spots in question yourself.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [8 years ago](https://wordpress.org/support/topic/js-errors-in-admin/#post-10070910)
 * Been mulling over this one a little bit. I was all ready to remove that `true`
   bit, but then I realized that part of the Mailchimp stuff that we load does have
   its own copy of jQuery included. So, it’s hard for me to justify because I’d 
   prefer not breaking things more.
 * That said, We do have the following 3 action hooks that you can remove that would
   prevent the mailing list parts from loading. at all. Worth trying out, for sure.
 *     ```
       remove_action( 'cptui_main_page_before_changelog', 'cptui_about_page_newsletter' );
       remove_action( 'cptui_below_post_type_tab_menu', 'cptui_products_sidebar' );
       remove_action( 'cptui_below_taxonomy_tab_menu', 'cptui_products_sidebar' );
       ```
   
 * First item is a detail from the About page, the other two are the sidebars on
   the right side, when editing a post type or taxonomy. We don’t have a way to 
   remove just part of itt, so we’ll just remove the whole sidebar.
 *  Thread Starter [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * (@benjaminniess)
 * [8 years ago](https://wordpress.org/support/topic/js-errors-in-admin/#post-10072714)
 * Hi Micheal,
 * Thanks for the tip I’ll go for it for now. Let me know if you have some news.
 * Thanks again!

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

The topic ‘JS errors in admin’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [benjaminniess](https://wordpress.org/support/users/benjaminniess/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/js-errors-in-admin/#post-10072714)
 * Status: resolved