Support

Home Forums Event Espresso Premium Why is EE4 deleting Tickets from Events?

Why is EE4 deleting Tickets from Events?

Posted: September 19, 2015 at 2:39 pm


Stephen Anchell

September 19, 2015 at 2:39 pm

I have created tickets in a single event, published the event, exited the event, and without doing anything else gone back in to find all but the first ticket missing. I have now done this six times. Why is it not saving the tickets?

Here are two screenshots. The first is what the page looks like after I publish it, the second is how it looks after I exit and return.

http://anchellworkshops.com/wp-content/uploads/2015/09/Screenshot-2015-09-19-13.26.58.png

http://anchellworkshops.com/wp-content/uploads/2015/09/Screenshot-2015-09-19-13.29.38.png


Tony

  • Support Staff

September 21, 2015 at 6:08 am

Hi Stephen,

Does this only happen when creating the event? As in if you edit one of the events this has happened on, create a new ticket and update the event, does the ticket save?

Are you providing a title for your event before saving?


Stephen Anchell

September 21, 2015 at 6:52 am

Greetings, Tony. Thank you for getting back to me.

First, I have just migrated to EE4 and am having numerous issues, some appear in other forum posts and have not been resolved since last week. I am considering restoring my web site and asking for my money back. But we won’t go there yet.

Second, I have five upcoming events. I am attempting to create one and make it work. Since last week I have no registration program functioning on my site and a dozen or more broken links showing up on search engines as 404 errors, thank you EE4.

I create an event WITH A TITLE, yes, I know enough to do that. I change FREE TICKET to Double-occupancy, and enter a tuition amount. I then create 5 more tickets, single-occupancy, non-U.S. Citizen, etc. I publish. I navigate elsewhere, I go back into the event and VOILA! only double-occupancy is there. I have done this 6 times now.

Could it be because I am not assigning individual quantities to each ticket? That’s the only thing I haven’t tried and it just occurred to me this morning.

I am putting a total quantity of 12 in the overall event.


Stephen Anchell

September 21, 2015 at 6:54 am

BTW, I am fully aware that this may be some dumb thing on my part that I am overlooking. If so I will abase myself with apologies. But for now, the ball is in EE4’s court.


Tony

  • Support Staff

September 21, 2015 at 7:16 am

I’m sorry you having problems with EE4.

Could it be because I am not assigning individual quantities to each ticket? That’s the only thing I haven’t tried and it just occurred to me this morning.

No, that would not cause this.

I create an event WITH A TITLE, yes, I know enough to do that. I change FREE TICKET to Double-occupancy, and enter a tuition amount. I then create 5 more tickets, single-occupancy, non-U.S. Citizen, etc. I publish. I navigate elsewhere, I go back into the event and VOILA! only double-occupancy is there. I have done this 6 times now.

It wasn’t that I assumed you didn’t know to add a title, but some users create the event then add a title later. The problem with this is WordPress saves the post (EE Events are posts) as an auto-draft and this prevents EE from being able to hook in and do its thing which can cause some weird and wonderful problems when combined with other plugins. (Generally EE manages to set everything up correctly once the title is updated but we recommend re-crating the event to be sure)

So now I know that’s not the cause we can move on 🙂

I’ve been reading over your other thread here:

https://eventespresso.com/topic/drops-info-from-events/

and I suspect something is preventing EE from updating the database correctly.

The fatal error shown here:

http://anchellworkshops.com/wp-content/uploads/2015/09/Screenshot-2015-09-19-10.51.08.png

Is that still happening?

Can you go to Event Espresso -> Pricing, do you see something like this – http://take.ms/6Tsi2


Stephen Anchell

September 21, 2015 at 7:51 am

It is quite possible that I created the event and then added the title. It is also possible that I created the event and then decided to change the title. So, what you are saying is that:

1. Always create a title first. If you don’t then you may have to start from scratch. If this is so then EE4 should have a warning at the top of the Event page, in caps: NOTE: CREATE THE TITLE BEFORE YOU DO ANY HARD WORK ON THIS OR YOU WILL PROBABLY LOOSE EVERYTHING AND HAVE TO START OVER. AND HEY! WHATEVER YOU DO DON’T CHANGE THE TITLE TO SOMETHING MORE APPROPRIATE AFTER YOU’VE CREATED THE EVENT!!!!!

It doesn’t seem to me this would be too hard for your program developers to do and would probably prevent a lot of extra work and frustration for your users.

Enough of my venting.

I am not certain what you are referring to in the post “Drops Info from Events.” Lorenzo has already addressed the issue regarding Custom Messages and apparently I was misusing them. I have read your documentation and am still confused about their use and purpose, but they are not as important as getting basic registration up and running.

The fatal error message first appeared in WP while using EE3. When I migrated to EE4 all of my Events were brought over, along with the currently registered users, but the Events were empty, the right hand column had no options available, and the fatal error message appeared at the bottom.

In case you are not aware, at Lorenzo’s request I created a user name and p/w for your tech team so you should have access to the site as an admin. Please ask Lorenzon for the p/w as it was auto generated by WP and sent to Lorenzo.

In EE>Pricing I see two options: Free Admission and Sales Tax. Where should I look for the take.ms/6Tsi2?


Stephen Anchell

September 21, 2015 at 8:20 am

I do not know if this will help but the fatal error message references EE and Line 91 of code in my file manager > /home/anchel2/public_html/wp-content/plugins/event-espresso-core-reg/core/db_classes/EE_Taxes.class.php

Here is the line of code and the surrounding lines:

}

/**
* simply take an incoming ticket and calculate the subtotal for the ticket
* @param EE_Ticket $ticket
* @return float subtotal calculated from all EE_Price[] on Ticket.
*/
private static function _get_subtotal_for_admin( EE_Ticket $ticket ) {
$subtotal = 0;
//get all prices
$prices = $ticket->get_many_related( ‘Price’, array( ‘default_where_conditions’ => ‘none’, ‘order_by’ => array( ‘PRC_order’ => ‘ASC’ ) ) );
//let’s loop through them (base price is always the first item)
foreach ( $prices as $price ) {
if ( $price instanceof EE_Price ) {
switch ( $price->type_obj()->base_type() ) {
case 1: // base price
case 3: // surcharges
$subtotal += $price->is_percent() ? $subtotal * $price->get( ‘PRC_amount’ ) / 100 : $price->get( ‘PRC_amount’ );
break;
case 2: // discounts
$subtotal -= $price->is_percent() ? $subtotal * $price->get( ‘PRC_amount’ ) / 100 : $price->get( ‘PRC_amount’ );
break;
}

91 is the one that reads: witch ( $price->type_obj()->base_type() ) {

It occurs to me, now that I have read it, it may only refer to tax and not affect anything else. As I am in a state that does not charge sales tax and it wouldn’t apply to me anyway, this may be a non-issue.


Tony

  • Support Staff

September 21, 2015 at 8:43 am

1. Always create a title first. If you don’t then you may have to start from scratch. If this is so then EE4 should have a warning at the top of the Event page, in caps: NOTE: CREATE THE TITLE BEFORE YOU DO ANY HARD WORK ON THIS OR YOU WILL PROBABLY LOOSE EVERYTHING AND HAVE TO START OVER. AND HEY! WHATEVER YOU DO DON’T CHANGE THE TITLE TO SOMETHING MORE APPROPRIATE AFTER YOU’VE CREATED THE EVENT!!!!!

Sorry there seems to be some confusion over what I said above.

Yes you should always create a title with your events but that doesn’t prevent you from changing them afterwards.

It applies only when creating the event, if you create an event with a blank title WordPress creates an auto-draft which can cause problems, but not always (it depends on many different situations which is why its not something we can easily prevent). Creating an event with a title, then editing the title causes no problems at all, you will always have the ability to change the event title after creating the event.

I am not certain what you are referring to in the post “Drops Info from Events.”

I was referring to the error message posted here:

https://eventespresso.com/topic/why-is-ee4-deleting-tickets-from-events/#post-173872

Which was the screenshot I included above as it indicates a problem with the info being pulled from the database. I suspect it may be connected to why your tickets are disappearing on save.

In EE>Pricing I see two options: Free Admission and Sales Tax. Where should I look for the take.ms/6Tsi2?

That’s fine as is, as long as you actually see some default pricing, which you do.

In case you are not aware, at Lorenzo’s request I created a user name and p/w for your tech team so you should have access to the site as an admin. Please ask Lorenzon for the p/w as it was auto generated by WP and sent to Lorenzo.

I’ve pulled your login details and will take a look.


Stephen Anchell

September 21, 2015 at 9:48 am

Thank you for hanging in, Tony. There is nothing more that I want right now than to get EE4 working. I do not understand this:
***
I was referring to the error message posted here:

https://eventespresso.com/topic/why-is-ee4-deleting-tickets-from-events/#post-173872

Which was the screenshot I included above as it indicates a problem with the info being pulled from the database. I suspect it may be connected to why your tickets are disappearing on save.
***
When I click on the link it simply takes me to the post above.

On my end I think the next thing for me to do is delete all of my events, EE3 and EE4 and start over again with a new event, make certain it has a title, add 2 tickets, and publish it. BTW, in EE3 I would copy and paste a shortcode into a WP page and then place Register Buttons on the workshop page that pointed to the shortcode and opened a registration page. Is that how it is done in EE4?


Tony

  • Support Staff

September 21, 2015 at 9:56 am

The issue with the disappearing tickets is actually due to a Javascript issue on the Event Editor page. This could be caused by either another plugin or the sites theme adding scripts to the page.

I created a test event and duplicated the ticket, then saved, as you mentioned only the single ticket was shown.

I then duplicated the ticket and found a Javascript error was thrown when doing so – http://take.ms/fw3gK

Updating the event removed that ticket.

I then created a new ticket – http://take.ms/YRHaY
Notice how on that ticket the datetime is not selected, so the ticket applies to nothing, then on save is remove, because it applies to no datetimes.

This is what happens when I create a new ticket on a test site – http://take.ms/PD0WA
(Notice the datetime is automatically selected)

So right now to create a ticket you’ll need to manually click that checkbox to select a datetime the ticket applies to, it then won’t be removed on save.

We can help troubleshoot to find what is causing the javascript to stop working, however doing so requires temporarily disabling all non-EE plugins and retesting (and also possible switching to a default theme to rule out a theme conflict). We recommend creating a database backup before doing this just to be safe, can you create a database back up now before we provide the next steps?


Tony

  • Support Staff

September 21, 2015 at 10:02 am

Apologies, the link above should have been this link:

https://eventespresso.com/topic/drops-info-from-events/#post-173781

Which shows an issue with the ‘datetimes’ section on your migrated event. I suspected it was connected to the issue with the disappearing tickets, but it appears not as shown in my above post (it is an issue with your migrated events, but not related to this issue)


Stephen Anchell

September 21, 2015 at 10:17 am

I can do a DB backup but I just did two complete b/u prior to migrating to EE4 and nothing else has been done on the site since then except trying to get EE4 working. Both b/u are saved on another computer right now.

The first b/u was through File Manager, and the second was using UpDraft plugin. If you want me to back up again I will do so but then I must leave for an appointment in 15 minutes, before it will be through.

The point is, right now my site is not functional without registration. If you wish to disable all plug ins that should be okay, as long as you are confident they can be activated again.

If you want me to do a third b/u right now I will get it started.


Lorenzo Orlando Caum

  • Support Staff

September 21, 2015 at 12:04 pm

Hi Stephen, create a backup using your preferred backup tool. Then once that is done, temporarily deactivate all plugins and reactivate only Event Espresso.

Next, open a new browser tab and go to Event Espresso –> Events. Now click on add new and then once you are at the event editor enter an event title, brief description, and then setup a couple ticket options same as before (e.g. duplicate and adjust price).

Then save.

If the ticket options appear to be okay then, switch to your other browser tab that shows the WP plugins screen and reactivate a few plugins. Then switch back to your browser tab with the event editor and try duplicating a ticket and save.

Repeat the steps above until the tickets stop saving as expected. Then you’ll know the plugin that is creating a conflict.

From here, you can reactivate all other plugins and then trash this test event.


Lorenzo


Stephen Anchell

September 21, 2015 at 1:58 pm

Greetings, Lorenzo, welcome back.

I really hoped that this would work.

I did as you said. Made a full backup and saved it remotely. I deactivated ALL of my plugins including the WP User Control, EE4, etc.

I opened a new tab (did you mean for me to close WordPress and reenter?) and ONLY activated EE4. I created a new Event, beginning with the name AAAAA, description, 3 tickets. Saved Draft. Clicked on Preview Page and only one ticket appeared. Went back into EE4 Events opened AAAAA and there is only one ticket showing.


Stephen Anchell

September 21, 2015 at 2:05 pm

The following Error Message is now appearing at the top of my WP page:

A potential issue has been detected with one or more of your Event Espresso pages. Go to Event Espresso Critical Pages Settings to view your Event Espresso pages.

Clicking on “Event Espresso Critical Pages Settings” it takes me to a page with that reads:

Critical Pages & Shortcodes

Followed by a box that reads:

The following shortcodes and page settings are required for Event Espresso to function properly. These shortcodes should not be replaced with any other shortcodes. Please view this page for a list of optional shortcodes you can use on other pages.


Lorenzo Orlando Caum

  • Support Staff

September 21, 2015 at 2:20 pm

Hi Stephen,

Your registration cancelled page was in the trash. There are 4 pages with shortcodes that Event Espresso uses for registrations on your site. If there is an issue, then you’ll see that notice so you can correct the issues.

I restored the registration cancelled page.

Could we run through the troubleshooting steps from our end?

Duplicating the datetimes appears to work but duplicate the tickets does not.


Lorenzo


Stephen Anchell

September 21, 2015 at 2:27 pm

OOOPS! I just did that. I was trying to clean up some of the unused pages and when I saw “Registration Cancelled” I thought, I don’t remember that page, and trashed it.

Yes. You have my permission to do whatever you need to in order to get this going. When deactivating plugins didn’t work I reactivated the critical ones. Either you or I can deactivate them again – though deactivating corrupted my user forum – there is text missing and I’m not certain how to get it back.


Stephen Anchell

September 21, 2015 at 2:28 pm

BTW, don’t worry about the forum, it is a secondary consideration.

Also, let me know if you are taking over and I will stop doing anything to the site until I hear from you.


Tony

  • Support Staff

September 21, 2015 at 3:08 pm

Hi Stephen,

Can you send me a copy of the theme you are using please?

If you can send a copy to support[at]eventespresso.com I’ll install it on a test site and see if the same happens there.


Stephen Anchell

September 21, 2015 at 3:21 pm

Sent to support


Stephen Anchell

September 21, 2015 at 3:22 pm

I have to do work outside. If you need my assistance would you please call? I will send my phone number to support.


Tony

  • Support Staff

September 21, 2015 at 4:13 pm

I’ve confirmed this is a theme conflict.

The theme is loading Javascript within all pages of the admin and this is breaking the ticket editor.

It is recommended to contact the theme author and request they only load the Javascript they needed within the pages that actually need it. However I have created a cist specific plugin to remove the Javascript from the event editor which allows the ticket editor to work correctly.

If you download this plugin – http://take.ms/ruFjE

Then add that to your site like any normal plugin

Dashboard -> Plugins -> Add New -> Upload plugin.

Select the zip file you downloaded from above and active it.

Then re-test the event editor and confirm if the tickets save.


Stephen Anchell

September 21, 2015 at 9:28 pm

I have written the theme developer – we’ll see what they do.

The plugin works perfectly. Now I just have to learn how to use the program. I’m sorry for all the grief but thank you for hanging in there.


Tony

  • Support Staff

September 22, 2015 at 3:12 am

No problem, happy to help.

The support post ‘Why is EE4 deleting Tickets from Events?’ 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