{"id":1535390,"date":"2018-05-21T09:21:39","date_gmt":"2018-05-21T16:21:39","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/"},"modified":"2018-05-21T09:21:39","modified_gmt":"2018-05-21T16:21:39","slug":"calendar-view-ajax-switching-between-months-does-not-work","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/","title":{"rendered":"Calendar view AJAX switching between months does not work"},"content":{"rendered":"<p>I&#8217;m using Events Calendar Pro with a custom theme that I built. When I try and switch between months the AJAX call just hangs with the loading icon and never goes through.<br \/>\nHere are some details about the troubleshooting I have done so far:<br \/>\nIt works fine when logged into WordPress, but not when logged out. This made me think it was a caching related issue so I reached out tot he host and asked them to exclude that page from caching but that did not fix the issue.<br \/>\nI tried switching to the default twentysixteen theme on a staging environment and that fixed the issue so I am confident the problem has something to do with my theme. The theme for the site that the calendar is on is a custom child theme I built off of a custom parent theme I also built.<br \/>\nNow that I know it is probably an issue with my custom theme I figured it was related to a javascript conflict so I reset the staging environment and commented out all of the javascript files being loaded in both the parent theme and the child theme in the <code>functions.php<\/code> files, but that did not fix the issue either.<br \/>\nThen I tried also disabling all plugins except for advanced custom fields (since my theme uses it so heavily the site won&#8217;t really load without the plugin being active) and still no luck.<\/p>\n<p>I finally reset the staging environment again and tested disabling the AJAX on the calendar using a snippet I found on the forums here and the calendar now switches between months fine without AJAX.<\/p>\n<p>Could the issue possibly have to do with something PHP related? I figured since the error I&#8217;m getting is related to the AJAX call that the issue had to be JS related.<\/p>\n<p>Any insight you can provide would be really helpful.<\/p>\n","protected":false},"template":"","class_list":["post-1535390","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Calendar view AJAX switching between months does not work -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Calendar view AJAX switching between months does not work -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m using Events Calendar Pro with a custom theme that I built. When I try and switch between months the AJAX call just hangs with the loading icon and never goes through. Here are some details about the troubleshooting I have done so far: It works fine when logged into WordPress, but not when logged [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/\",\"name\":\"Calendar view AJAX switching between months does not work -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-05-21T16:21:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Calendar view AJAX switching between months does not work\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Calendar view AJAX switching between months does not work -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/","og_locale":"en_US","og_type":"article","og_title":"Calendar view AJAX switching between months does not work -","og_description":"I&#8217;m using Events Calendar Pro with a custom theme that I built. When I try and switch between months the AJAX call just hangs with the loading icon and never goes through. Here are some details about the troubleshooting I have done so far: It works fine when logged into WordPress, but not when logged [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/","name":"Calendar view AJAX switching between months does not work -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-05-21T16:21:39+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/calendar-view-ajax-switching-between-months-does-not-work\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Calendar view AJAX switching between months does not work"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1535390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1535390\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1535390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}