Support

Home Forums Event Espresso Premium How to get reserved tickets added back

How to get reserved tickets added back

Posted: January 16, 2019 at 11:44 am

Viewing 17 reply threads


Porter

January 16, 2019 at 11:44 am

I’ve followed your advice as per the following ticket https://eventespresso.com/topic/ticket-status-sold-out-but-no-tickets-sold-2/

And was able to release the “reserved” tickets. I have checked and the server does not have wp_cron() disabled. I want to make sure that the “reserved” / “incomplete” tickets are returned for sale. We need this to happen automatically without having to reset the Ticket and Datetime Reserved Counts.

Thanks for you help.


Porter

January 16, 2019 at 12:21 pm

This reply has been marked as private.


Tony

  • Support Staff

January 17, 2019 at 7:39 am

Hi there,

How long have those reserver tickets been reserved?

If wp_cron is not disabled then they should be clear automatically after roughly an hour.


Porter

January 17, 2019 at 3:33 pm

This reply has been marked as private.


Josh

  • Support Staff

January 17, 2019 at 3:46 pm

The Datetime Offset tool is not in any way related to wp_cron or the ticket reservations.

It may be that wp_cron isn’t working properly on your dev site. One helpful tool that you can use to troubleshoot wp_cron is the WP Crontrol plugin. You can download it here:
https://wordpress.org/plugins/wp-crontrol/
I’ve seen it happen where wp_cron wasn’t working at all, then installing that plugin provided some error messages that helped troubleshoot the issue. For example, after you activate the Crontrol plugin then go to its Cron Schedules page, it might display a message that tells you to put:
define( 'ALTERNATE_WP_CRON', true );
into the site’s wp-config.php file. Which should fix things for you if that’s all that’s needed.


Porter

January 22, 2019 at 2:50 pm

Thanks Josh – I have now installed this plugin but I’m not getting any errors. I noticed that the following schedule (?) keeps repeating

AHEE__EE_Cron_Tasks__expired_transaction_check
[
27
]
EE_Cron_Tasks::expired_transaction_check()
2018-10-25 16:21:23 (now) Non-repeating

Does that mean anything?


Tony

  • Support Staff

January 22, 2019 at 2:58 pm

Those are expected.

That cron check is added whenever a transactions is created for EE and it’s to check that the status of the transaction after the users session has expired, for example a user may have paid and then never returned back to the site from the payment provider, it’s a bit of a safety net for all transactions.

The [27] should be the ID of the transaction, so you could have multiple’s of those jobs, for example:

AHEE__EE_Cron_Tasks__expired_transaction_check[27]
EE_Cron_Tasks::expired_transaction_check()
AHEE__EE_Cron_Tasks__expired_transaction_check[28]
EE_Cron_Tasks::expired_transaction_check()
AHEE__EE_Cron_Tasks__expired_transaction_check[51]
EE_Cron_Tasks::expired_transaction_check()

Would be 3 individual checks, one for 27, 28 and 51.

So if you select X ticket(s) on a the ticket selector for an active/upcoming event with spaces available you see those X amounts of tickets added to the reserved value, but then after ~ 1 hour they aren’t added back?


Porter

January 22, 2019 at 4:49 pm

Thanks for the explaination – unfortunately they are still not being added back!


Tony

  • Support Staff

January 24, 2019 at 5:09 am

Do you have Event Espresso in maintenance mode?

I’ve rechecked the code and the only 2 conditions I can see for those reserved tickets not clearing is either cron is disbaled or EE is in maintenance mode.

If you look at the Cron events (Tools -> Cron Events) do you see:

AHEE__EE_Cron_Tasks__clean_up_junk_transactions
EE_Cron_Tasks::clean_out_junk_transactions()

If so that’s the cron event that should trigger the cleanup, try running that from that page (Yes I know you don’t want to manually trigger the function to do this, but right I want to know if the tickets are released if the cron is manually triggered).

Do the reserved tickets release then?


Porter

January 24, 2019 at 6:28 am

This is what I see

HEE__EE_Cron_Tasks__clean_up_junk_transactions None
EE_Cron_Tasks::clean_out_junk_transactions()
2018-09-25 21:30:41 (now) Every hour

The next run for all the events is showing november last year. That could be about the time the staging site was created.


Porter

January 24, 2019 at 6:38 am

I’ve also checked with our host provider and they’ve confirmed that the Cron is enabled. EE is also not in maintenance mode.


Tony

  • Support Staff

January 24, 2019 at 8:18 am

HEE__EE_Cron_Tasks__clean_up_junk_transactions None
EE_Cron_Tasks::clean_out_junk_transactions()
2018-09-25 21:30:41 (now) Every hour

That cron job isn’t running and that will be why tickets are not released. I’ll need to check a couple of options and post back shortly, in the meantime…

Did you click the run now button and check if the tickets released? (You may need to scroll to the right to view the link to run now)


Tony

  • Support Staff

January 24, 2019 at 8:37 am

The next run for all the events is showing November last year. That could be about the time the staging site was created.

Actually, I’ve just realised what you posted here.

That means none of you Cron jobs have been running, regardless of what you host is saying, if all of your cron jobs are logged as roughly November 2018 then they aren’t running.

There are a couple of ways to confirm this, here’s 1:

Go to Dashboard -> Posts -> Add new.

Add the content for a new post but do NOT publish it, set it as a scheduled post – https://monosnap.com/file/FZqf1pjz96aFtDOjZheRymdgiZh5G7

Set it for whatever time you prefer, 10 mins from now is fine, then in 15/20 mins, check if that post has published (I’m 99% certain it won’t be)

Note that has nothing to do with Event Espresso and just uses WP Cron to publish the post, if that’s not working, WP Cron isn’t working.

Something to note with the above, for it to work you need to hit the front end of your site after the cron schedule has passed, WP Cron is a ‘fake’ cron that checks if any jobs are scheduled each time the front end of the site is hit.

You could also try activating the Alternative WP-cron within WP:

https://codex.wordpress.org/Editing_wp-config.php#Alternative_Cron

In any case, with regards to your host stating that this is working, you could ask them why then do all of the crons show they last run in Novermber 2018 rather than now (none of the crons should be ‘last run’ that long ago).


Porter

January 24, 2019 at 8:48 am

Thanks for your detailed response. I agree, it does sounds like the Cron is not working. I’ll try a scheduled post and will get in touch with our host again.


Porter

January 24, 2019 at 11:52 am

it seems like there’s a plugin conflict – now to find out which one!


Tony

  • Support Staff

January 24, 2019 at 1:23 pm

I’m assuming your host pointed you to a plugin conflict? Did they say how they know there’s a conflict or they ‘just know’?

Have you tried clicking run on the cron I mentioned? If that doesn’t work it’s easier to spot which plugin is conflicting as you can disable plugins one by one, run the crib in between each one until it runs and you’ve found the conflict when it works.


Porter

January 24, 2019 at 2:19 pm

They did a proper check on the server and looked for any files that could be stopping the cron. They said the server side was all fine and that it must be caused by an appication. I’m about to start checking the plugins now.


Tony

  • Support Staff

January 25, 2019 at 5:07 am

Please do let us know how you get on, I’m interested in which plugin you find causes the conflict.

Viewing 17 reply threads

The support post ‘How to get reserved tickets added back’ 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