Title: JavaScript error on new month view
Last modified: February 2, 2020

---

# JavaScript error on new month view

 *  Resolved [Martin Taylor](https://wordpress.org/support/users/docdunning/)
 * (@docdunning)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-on-new-month-view/)
 * I’m seeing this error when I try out the new V5 month view.
    Uncaught TypeError:
   Cannot convert undefined or null to object at Function.keys (<anonymous>) at 
   Object.obj.setContainerClasses (breakpoints.js?ver=5.0.0.1:1) at Object.obj.initTasks(
   breakpoints.js?ver=5.0.0.1:1) at Object.obj.setup (breakpoints.js?ver=5.0.0.1:
   3) at <anonymous>:4:41 at t.activateScript (rocket-loader.min.js:1) at rocket-
   loader.min.js:1 at t.run (rocket-loader.min.js:1) at rocket-loader.min.js:1 at
   HTMLScriptElement.<anonymous> (rocket-loader.min.js:1)
 * The cause appears to be that there is a script on the page, which starts:
 * <script type=”application/ld+json”>
    [{“@context”:”[http://schema.org&#8221](http://schema.org&#8221);,”
   @type”:”Event”,”name”: ….
 * When I manually remove this script from the page, the JS error no longer occurs.
 * Seems to be a conflict between this script:
 * <script class=”tribe-events-breakpoints” type=”ea309bd93536031b5cb9508c-text/
   javascript”>
    if ( ‘undefined’ !== typeof window.tribe ) { var scripts = document.
   getElementsByTagName( ‘script’ ); window.tribe.events.views.breakpoints.setup(
   scripts[ scripts.length – 1 ] ); } </script>
 * and the LD+JSON script if it’s on that page. I can comment out either of them
   and the errors go away.
 * Any idea how this error can be avoided?

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

 *  Thread Starter [Martin Taylor](https://wordpress.org/support/users/docdunning/)
 * (@docdunning)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-on-new-month-view/#post-12390522)
 * OK, so I’ve found that the problem is caused by the “Upcoming Events” widget.
   It has an option to “Generate JSON-LD data”. If that is checked, then it causes
   an error in breakpoints.js. If I uncheck the option, then no JS error.
 * This does look like a compatibility issue for Modern Tribe to investigate, given
   that it’s between two of the plugin’s components.
 *  Plugin Author [Gustavo Bordoni](https://wordpress.org/support/users/bordoni/)
 * (@bordoni)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-on-new-month-view/#post-12395724)
 * Hi [@docdunning](https://wordpress.org/support/users/docdunning/),
 * Thanks so much for the amount of information you are providing us here and on
   some other forum threads, it’s really helpful to have debug information so we
   can pinpoint problems and fix.
 * I will make sure this is fixed from our side of things, but the bug is not specifically
   on our code, it’s on WPRocket Minification of the Scripts.
 * It seems like it’s try to use the incorrect Script data for what it needs to 
   do.
 * Thanks again,
 * my best Regards,

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

The topic ‘JavaScript error on new month view’ is closed to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * ["js error"](https://wordpress.org/support/topic-tag/js-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [Gustavo Bordoni](https://wordpress.org/support/users/bordoni/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-on-new-month-view/#post-12395724)
 * Status: resolved