Title: JavaScript errors on New Post screen
Last modified: August 21, 2016

---

# JavaScript errors on New Post screen

 *  Resolved [andyadams](https://wordpress.org/support/users/andyadams/)
 * (@andyadams)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/)
 * Hey there,
 * Thanks for the great plugin. Really, really awesome.
 * I’m hitting an issue with the New Post screen. 6 JavaScript errors are being 
   thrown, and they look like this:
 * `
    Uncaught TypeError: Cannot read property 'model' of undefined model.js?ver
   =1.2.0:20 Uncaught TypeError: Cannot read property 'model' of undefined collection.
   js?ver=1.2.0:19 Uncaught TypeError: Cannot read property 'controller' of undefined
   controller.js?ver=1.2.0:4 Uncaught TypeError: Cannot read property 'view' of 
   undefined view.js?ver=1.2.0:4 Uncaught TypeError: Cannot read property 'view'
   of undefined toolbar.js?ver=1.2.0:36 Uncaught TypeError: Cannot read property'
   view' of undefined media.js?ver=1.2.0:58
 * It appears that **wp.media** isn’t defined in the JS. Can you think of any reason
   why that might be? I’m not familiar with the internals of the media editor. Thanks!
 * [http://wordpress.org/plugins/visualizer/](http://wordpress.org/plugins/visualizer/)

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

 *  [eugene.manuilov](https://wordpress.org/support/users/madpixels/)
 * (@madpixels)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4210900)
 * Hi [@andyadams](https://wordpress.org/support/users/andyadams/)
 * What version of WordPress do you use?
 *  Thread Starter [andyadams](https://wordpress.org/support/users/andyadams/)
 * (@andyadams)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4210997)
 * Apologies for not including that. I’m on **3.6.1**.
 * This could very well be a conflict with another plugin – and thus not your problem–
   but I was just wondering if you could think of anything that would cause wp.media
   to not be instantiated, that’d be great.
 * Here’s a potential clue: We started investigating issues with the Visualizer 
   when registering CPTs that don’t support the ‘editor’. When `post_type_supports('
   editor' )` is **false**, some of the WP Admin code doesn’t execute.
 * Specifically, see **[wp-admin/edit-form-advanced.php lines 27-30](http://core.trac.wordpress.org/browser/trunk/src/wp-admin/edit-form-advanced.php#L27)**
   as a potential reason for the media not being enqueued in certain cases.
 * Let me know if you have any questions about all of this – I’m happy to help debug,
   and I’ll let you know if I can figure anything out.
 *  [eugene.manuilov](https://wordpress.org/support/users/madpixels/)
 * (@madpixels)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4211015)
 * Thanks andyadams!
    I will test it on my end and will try to fix it.
 *  Thread Starter [andyadams](https://wordpress.org/support/users/andyadams/)
 * (@andyadams)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4211016)
 * Thank you kindly. Let me know if I can help.
 *  [eugene.manuilov](https://wordpress.org/support/users/madpixels/)
 * (@madpixels)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4211025)
 * Hi [@andyadams](https://wordpress.org/support/users/andyadams/)
 * Could you send me your email/skype/hangout via [this form](http://visualizer.madpixels.net/contact-us/)?
   I will send you fixed version to test if it removes your issue.
 *  Thread Starter [andyadams](https://wordpress.org/support/users/andyadams/)
 * (@andyadams)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4211051)
 * Just sent it. Thank you kindly!
 *  [eugene.manuilov](https://wordpress.org/support/users/madpixels/)
 * (@madpixels)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4211052)
 * I have sent you the plugin. Please, check your it and let me know if it fixes
   your issues.
 * Thanks!
 *  Thread Starter [andyadams](https://wordpress.org/support/users/andyadams/)
 * (@andyadams)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4211078)
 * The fix you sent works! I look forward to seeing it in a new release!

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

The topic ‘JavaScript errors on New Post screen’ is closed to new replies.

 * ![](https://ps.w.org/visualizer/assets/icon-256x256.gif?rev=3084574)
 * [Visualizer: Tables and Charts Manager for WordPress](https://wordpress.org/plugins/visualizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/visualizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/visualizer/)
 * [Active Topics](https://wordpress.org/support/plugin/visualizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/visualizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/visualizer/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [andyadams](https://wordpress.org/support/users/andyadams/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/javascript-errors-on-new-post-screen/#post-4211078)
 * Status: resolved