Support

Home Forums Event Espresso Premium Add Event – displays 57 start times – how to get rid of them

Add Event – displays 57 start times – how to get rid of them

Posted: May 20, 2015 at 12:59 pm


Jim Schuyler

May 20, 2015 at 12:59 pm

I’m running on WPEngine. They upgraded us to WP 4.2.2 recently, but we were running EE3 fairly old (ver 28). Suddenly when using ADD EVENT we see 57 start times. There are also 9,000+ ticket prices. We think related to 4.2.2 but don’t know. I have upgraded EE3 to most recent now, but need help removing the 57 start times and thousands of ticket prices. Can give you access to WPE staging where I am working on this. Urgent because we have 100 stores who depend on this system so would like to fix today or tomorrow (Wed or Thurs). Can schedule a call with you if we plan a little in advance.


Josh

  • Support Staff

May 20, 2015 at 1:12 pm

Hi Jim,

This is related to the recent WP security updates that were rolled out. What you’re seeing is the result of not updating to the current Event Espresso 3.1.37.3.p version, and then trying to create events which didn’t end up getting saved.

You can remove those extra start times by going into phpmyadmin. They are in the wp_events_start_end table. All rows that have 0 for event_id should be removed. The same will also be true for any rows in wp_events_prices wp_events_category_rel too. Any rows that have 0 for event_id should be removed there too.


Jim Schuyler

May 20, 2015 at 1:35 pm

Thank you for your almost immediate response. Yes, those do correct the database and new event issue, and I have also updated to the “37” revision of EE3 on this staging site. Will do more testing, and also we have customized the creation of the calendar so I have to port my custom code over. I requested priority support, but let’s hold off on that until I verify that this is fixed.


Josh

  • Support Staff

May 20, 2015 at 1:39 pm

Hi Jim,

It turns out the almost immediate response is the result of requesting priority support. 🙂


Jim Schuyler

May 20, 2015 at 1:54 pm

And is completely worth the price. Saved me several hours. Will be in touch if I need a followup call or more detail.


Jim Schuyler

May 21, 2015 at 12:26 am

I have upgraded all of our EE3 components and only one difficulty. A variable $espresso_calendar used to be a global, and contained settings of many formats for the calendars, but it appears to be missing. I will look at code on Thursday, but perhaps you know offhand what happened to it?


Dean

May 21, 2015 at 2:51 am

Hi Jim,

I checked the Calendar 2.2.6 (latest as of writing) and the $espresso_calendar global is still in use. The usage of it is contained in one file /wp-content/plugins/espresso-calendar/espresso-calendar.php


Jim Schuyler

May 21, 2015 at 4:12 pm

When I declare it global in another place and then try to print_r($espresso_calendar) is is empty (or maybe undefined) — meaning that print_r doesn’t show it as an associative array, which is what it should be. It’s not even an array. I’m checking to see if it is even “loaded” at that point. Yes, I’m using 2.2.6.P.


Jim Schuyler

May 21, 2015 at 4:26 pm

I’m using EE3. I do not see the global in espresso-calendar.php but do see it in calendar_admin.php. This might not be loaded when I’m running in a regular user page rather than as an admin. Puzzling.


Lorenzo Orlando Caum

  • Support Staff

May 21, 2015 at 5:11 pm

Hi Jim, I’m not sure if that is what is occurring here since the name for the global below is slightly different.

On this page, we have an example of how to use the calendar shortcode for Event Espresso 3 in a template:

https://eventespresso.com/wiki/events-calendar-add-on/#ee3customizations

Part of that requires a global be set so the calendar resources are loaded:

global $is_espresso_calendar;
$is_espresso_calendar = TRUE;

Would you happen to be using the calendar directly in one of your theme templates?


Lorenzo


Jim Schuyler

May 21, 2015 at 5:31 pm

I was able to load it using get_options() and it is 100% operational now. I am using it in a custom shortcode function, which I think is pretty much equivalent to the way you do templates. We embed the shortcode in a functional customer page in the site. stores.athleta.net In our custom shortcode we read the settings, then we emit Javascript code that sets up the calendar. I’m quite familiar with how “fullCalendar” works and you use it directly and without modification, so this is really smooth. We load up the calendar using javascript with the event info EE3 gives us, and it displays very nicely with our formatting and functionality. So thank you, and we are running fine as of this afternoon using this information.


Jim Schuyler

May 21, 2015 at 8:09 pm

All done. Everything works. Thank you.


Dean

May 22, 2015 at 4:40 am

Good to hear. Anything else we can help with regarding this topic or can we mark this as resolved?


Jim Schuyler

May 22, 2015 at 4:45 pm

Oops, we have now run 12 hours with the new setup. As Josh mentioned, previously we had entries in wp_events_start_end and in wp_events_prices that had event_id equal to zero. I zapped those. I upgraded EE to 3.1.37, I tested, and we ran for 12 hours. Now we have one entry in each table with an event_id of zero. So the problem is “far better” but not entirely solved. Any ideas? I would like to nail this one, so I can insert debugging code and gather any info that would be helpful.


Tony

  • Support Staff

May 26, 2015 at 3:18 am

Hi Jim,

From reading above it appears multiple users add/edit events, is that correct?

The reason I ask is I’d like to know if you edited any specific events within that timeframe but if the above is true that’s not something we can see.

Do your events use ticket names longer than 100 characters?

Have you had any further occurrences of this since your last post?


Jim Schuyler

May 26, 2015 at 11:14 am

Several days later — no new zero events — however it was a weekend and store managers would generally not enter very many events over a holiday weekend. I will update this ticket if we see more zero events. I can always cron a PHP script that will delete these once a day if necessary, but I would rather know the problem is fixed.


Jim Schuyler

May 26, 2015 at 11:56 am

Actually, now that I think about it, we have a staging site where we could test. If you are suggesting you want to test this on our system, we already sent credentials when we requested premium support. So that’s a possibility. However even on staging we have two or three people working on testing sometimes. Let me know if you want to test or need some specific test performed on our staging environment.

We have many events with long titles and even longer descriptions. I’m sure we have hundreds that are over 100. We do not use “ticket names’ per se, and have not altered any of the defaults in the ticketing functionality. We have suppressed that by hiding all ticket-related fields using a special CSS both while editing and while customers are browsing.


Josh

  • Support Staff

May 27, 2015 at 2:51 pm

Hi Jim,

The current version of EE3 sets “maxlength” on the input for the event name, so the input field will not allow more than the max allowed characters (200 characters in the case of the event name field). Descriptions do not have a character limit.

The support post ‘Add Event – displays 57 start times – how to get rid of them’ 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