Support

Home Forums Event Espresso Premium Cannot add multiple dates to an event.

Cannot add multiple dates to an event.

Posted: October 22, 2014 at 12:17 pm


Alexander Quesada

October 22, 2014 at 12:17 pm

Hello,

I have events that are held on multiple dates and would like to easily add all of the dates to it. Whenever I click on “add datetime” or “create ticket”, it just refreshes the page and says “page updates”. Am I doing it wrong? Is there some other way to do this?

Thanks


Josh

  • Support Staff

October 22, 2014 at 12:40 pm

Hi Alexander,

Is your website hosted on WPEngine? If so, this can be fixed by opening a ticket with them and ask them to disable throttling of the WordPress Heartbeat API in the WordPress admin.


Alexander Quesada

October 22, 2014 at 12:41 pm

I also cannot click on the little settings gear next to the event datetime or tickets, when I do nothing happens..


Alexander Quesada

October 22, 2014 at 12:42 pm

Hello,

Thank you for the quick reply. No it is not, we are hosted on HostGator..


Alexander Quesada

October 22, 2014 at 12:56 pm

I looked up how to disable Heartbeat API under HostGator’s support page and did as it said. I added:

add_action( ‘init’, ‘kill_heartbeat’, 1 );
function kill_heartbeat()
{ global $pagenow; //if ( $pagenow == ‘index.php’ ) //if ( $pagenow == ‘post.php’ || $pagenow == ‘revision.php’ ) wp_deregister_script(‘heartbeat’); }

to the plugin.php file, but the issue is still occurring.


Josh

  • Support Staff

October 22, 2014 at 1:04 pm

Hi Alexander,

Please read these next two sentences carefully:

Disabling the Heartbeat API will only make things worse (that’s essentially what WPEngine does with their throttling). You will need to remove the code you added that disables the Heartbeat API.

Since you’re not on WPEngine, you can rule out the cause of the issue by deactivating other plugins and temporarily switching to the default WordPress theme. You can temporarily switch to a default theme for the admin only by using the theme test drive plugin.


Alexander Quesada

October 22, 2014 at 1:19 pm

Hello,

Thank you for all the information, I figured out the problem. It turns out “All In One SEO Pack” was causing the problem.


Josh

  • Support Staff

October 22, 2014 at 1:45 pm

Hi Alexander,

I checked into this. It looks like the All in One SEO’s plugin doesn’t enqueue its necessary scripts on the event editor page, which led to the errors you saw.


Alexander Quesada

October 23, 2014 at 7:44 am

I see, is there a way to fix this problem? Or should I disable it to edit the events, then enable it again?


Josh

  • Support Staff

October 23, 2014 at 8:50 am

Here are a few options on how this can be fixed:

1) They can add a filter similar to what the Yoast WordPress SEO plugin has to allow its scripts to be added to the Event editor. If you reach out to them and ask they may be able to include this in their next version.

2) In the meantime you can modify one line of code in the All in One SEO pack plugin to make sure it loads its scripts into the event editor. You open up its aioseop_module_class.php file and right around line 946 you’ll see this:

if ( ( $screen->base != 'post' ) && 
	( $screen->base != 'edit-tags' ) && 
	( $screen->base != 'toplevel_page_shopp-products' ) return;

You can see where they added a check for the Shopp plugin. You can do the same thing for Event Espresso. You change it to this:

if ( ( $screen->base != 'post' ) && 
	( $screen->base != 'edit-tags' ) && 
	( $screen->base != 'toplevel_page_shopp-products' ) && 
	( $screen->base != 'event-espresso' ) ) return;

They may end up adding an apply_filters() in that spot or somewhere else so the above conditional check can be overridden from an separate function. This will allow other plugins that have custom post type editors that use JavaScript to not break.

The support post ‘Cannot add multiple dates to an event.’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso