Support

Home Forums Event Espresso Premium Reg Code and Event ID numbers missing sequence

Reg Code and Event ID numbers missing sequence

Posted: June 11, 2019 at 7:29 am


CVJS

June 11, 2019 at 7:29 am

Reg code jumping sometimes hundreds between registrations. This does not bode well for updating my offline invoicing system.
It seems that a new Reg Code is being generated for every visitor to the site, even if they do not click through/begin the reg process.
Also noticed that the Event ID is not following the sequence – although missing far fewer numbers – when generating new events.
This has not always happened and only recently occurred. I’ve tried the usual – turn off all plugins – but to no avail. Has this happened to anyone else? Many thanks.


Josh

  • Support Staff

June 11, 2019 at 7:34 am

Hi,

The event ID is actually a WordPress post ID, so it shouldn’t follow sequence for events only. In other words, other posts added to your site (posts, pages, post revisions, venues, menu items, attendees, and any other custom post types) also get post IDs.

You might try the transaction ID for your invoicing system instead.


CVJS

June 11, 2019 at 7:46 am

This reply has been marked as private.


Josh

  • Support Staff

June 11, 2019 at 7:56 am

Is there a way I can begin the transaction ID at a specific number – i.e. 7800 – to avoid issue with my accounting? If not, no worries.

One way to do this would be do a test transaction where you won’t care about some orphaned data, and then go into the database and change its transaction ID to 7799. This will make it so the next transaction ID will be 7800.

It just seems strange that the EVENT ID is missing the sequence too. Any ideas on that?

I actually explained that in my reply above. Here’s that explanation again:

The event ID is actually a WordPress post ID, so it shouldn’t follow sequence for events only. In other words, other posts added to your site (posts, pages, post revisions, venues, menu items, attendees, and any other custom post types) also get post IDs.

Here’s a screenshot of a tiny part of a typical WordPress posts table that shows the types of post types (including espresso_events) that helps illustrate why you’ll see gaps in event IDs:

https://slack-files.com/T02SY781D-FK45WE8EN-8b6d3d63c8


CVJS

June 12, 2019 at 11:28 am

Sorted the database Josh, thanks for the screenshot explanation.

Looking at my generated invoice, it is using the shortcode [TXT_ID] to display the number to the buyer. This code is not showing the corresponding value for the transaction ID. Any ideas? I have searched to find a topic to solve this, but to no avail. Thank for your help,
Shane 🙂


Josh

  • Support Staff

June 12, 2019 at 11:51 am

This code is not showing the corresponding value for the transaction ID

May I ask what is the transaction ID for the transaction, and what is it showing?


CVJS

June 12, 2019 at 2:42 pm

So in the database, the number I want to display (running chronologically) has the heading REG_ID.
The value I was displaying before on my invoices was TXN_ID which worked fine until some time in March 2019.
What is the shortcode to display the REG_ID value from the database on my INVOICE TEMPLATE? Thanks Josh


Josh

  • Support Staff

June 12, 2019 at 3:14 pm

[REGISTRATION_ID] which can be inserted into the [ATTENDEE_LIST] template section.


CVJS

June 13, 2019 at 1:46 pm

So, adding the [REGISTRATION_ID} to the [ATTENDEE_LIST] section does not solve the issue…unless I can display it on the invoice as the invoice number. I have added it and do not see it appear when I save and then generate an invoice using my own email address as a test.
==
Plus I tried the trick with the changing the transaction ID to 7799, so that the next transaction ID would be 7800, but when I tried this the next generated transaction ID was 691 – it has assumed that the 7799 value was 690 (even though I edited it) and followed chronologically from their.
What am I doing wrong Josh.

It was all working perfectly until 2019-03-31, using the [TXT_ID] in the invoices as this was running chronologically. Do you know of any particular plugins or updates that effected this?


Josh

  • Support Staff

June 13, 2019 at 2:08 pm

[TXT_ID] was never available as a shortcode in the invoice. Are you sure you were using [TXT_ID] in the invoice?

Plus I tried the trick with the changing the transaction ID to 7799, so that the next transaction ID would be 7800, but when I tried this the next generated transaction ID was 691 – it has assumed that the 7799 value was 690 (even though I edited it) and followed chronologically from their.
What am I doing wrong Josh.

I think you may have edited the wrong database table.


CVJS

June 14, 2019 at 2:21 am

The table I made the edit in is: vdlrFUhhesp_registration
I have found another table vdlrFUhhesp_transaction showing values for transactions, is it this one I need to edit?
===
[TXN_ID] was/is the shortcode on my invoice template , sorry. Was there an update at the end of March ’19 that prevented this from working, or a known issue with another plugin that has caused it to slip out of order?
It jumped from [TXN_ID] 661 to [TXN_ID] 1001. It then continues 1004, 1005, 1162, 1444, 1796.
I have checked for ‘incomplete’ or ‘trashed’ registrations, in an attempt to locate the missing values, but they are know-where to be found – not even in the database.
It is as though every website visit is generating a new [TXN_ID].
==
Many thanks for your support.


Tony

  • Support Staff

June 14, 2019 at 3:49 am

[TXN_ID] was/is the shortcode on my invoice template , sorry. Was there an update at the end of March ’19 that prevented this from working, or a known issue with another plugin that has caused it to slip out of order?

There has been no update to how the TXN ID is generated, nor are we are of any plugin conflict.

However, TXN_ID’s are generated (and have always been generated) very early on. They are generated when a registration is created and that happens as soon as the user selects a ticket and submits the ticket selector (before they have entered anything else on the site). Its not ‘per visit’ but it is ‘per ticket selector submission’.

To see what I mean, open up your registrations list table (Event Espresso -> Registrations).

Click on the ‘Incomplete’ view and take note of the number of registrations, my example has 27 – https://monosnap.com/file/MgrRL3SOlK9WbRqkbh1vUbS8jdBCZL

In another tab, go to an event and select at least 1 ticket on the ticket selector, then submit – https://monosnap.com/file/dE56VPDA5PUo9bycfLrafMolLX7Cb6

Now stop, don’t go any further on that tab. Switch back to the other tab with the incomplete registration list and refresh it. Now you’ll have another Incomplete registration assigned to a ‘Failed’ transaction – https://monosnap.com/file/yuJpkHWw4TxdwbGgUtUgbK8Itko8RQ

(See I now have 28 regs in the list and TXN Date (and time) is a couple of minutes ago for me, UK time)

Every registration (and group registration) must be assigned to a transaction, so when a single (or group) registration is created, a TXN is created and assigned to it, even this early.

If you click on the TXN Date you’ll see it has a Transaction # value, why? Because that ID is the auto incrementing row ID in the DB table, when a row is added, it gets an ID. That’s the TXN ID and it means it is NOT chronological in the way you are expected, again note that it has always worked this way, this is not new.

It jumped from [TXN_ID] 661 to [TXN_ID] 1001. It then continues 1004, 1005, 1162, 1444, 1796.

So in short, this means the ticket selector was submitted X number of times and then nothing happened with those registrations, but the auto incremented ID was incremented when the TXN row was created.

I have checked for ‘incomplete’ or ‘trashed’ registrations, in an attempt to locate the missing values, but they are know-where to be found – not even in the database.

‘Incomplete’ registrations (like the ones shown in my screenshots) are registrations that do not have a ‘contact’ assigned to them, meaning the ‘Attendee information’ step was not completed during that session.

EE will automatically remove those registrations (and their transactions) after 1 week (by default), which is likely why you can’t find them.

—-

The fact that the TXN_ID worked chronologically for your previously means either your site didn’t get much traffic and the majority (if not all) traffic was valid and now your getting bots, users or both, submitting the ticket selector and not completing the registrations.


CVJS

June 14, 2019 at 9:08 am

Thanks for this Tony. I have done what you said and noted the information.

As I looked deeper I can see that something is creating an STS_ID of TFL twice every minute! This is causing the [TXT_ID] to reach a staggering value of 26,723 in three months. We do not have this many customers.
Is this likely to be a BOT? Any ideas what I can do? These failed registrations are, however NOT found in the INCOMPLETE or TRASH tabs. Again, strange as it did show when I followed your above instructions.

Your advice is greatly appreciated,
Shane 🙂


Josh

  • Support Staff

June 14, 2019 at 9:26 am

That could be a bot. When bots find a form, they’ll submit it. In this case a bot may have found the page with the ticket selector form. Event Espresso 4 will trash any transactions that didn’t submit the registration form later, so that’s why you’re not seeing them in the incomplete or trash tabs.

What you could do is activate reCAPTCHA for the ticket selector only (this is set in the Event Espresso > Registration Form > Settings page.

If you’re comfortable with editing .htaccess, you can also follow this guide to identify and block the bot:
https://perishablepress.com/block-bad-bots/#bbb04


CVJS

June 14, 2019 at 10:54 am

Thanks again Josh, it looks like we are getting to the bottom of this issue. I have read the BOT guide and will work on that.
Having attempted to activate reCAPTCHA on the registration form, the following error was shown:
Warning: get_class() expects parameter 1 to be object, null given in /homepages/24/d697786276/htdocs/clickandbuilds/InspiredForestSchoolTraining/wp-content/plugins/event-espresso-core-master-backup/core/EE_Config.core.php on line 448

Fatal error: Uncaught Error: Class name must be a valid object or a string in /homepages/24/d697786276/htdocs/clickandbuilds/InspiredForestSchoolTraining/wp-content/plugins/event-espresso-core-master-backup/core/EE_Config.core.php:449 Stack trace: #0 /homepages/24/d697786276/htdocs/clickandbuilds/InspiredForestSchoolTraining/wp-content/plugins/event-espresso-core-master-backup/core/EE_Config.core.php(476): EE_Config->_reset_espresso_addon_config() #1 /homepages/24/d697786276/htdocs/clickandbuilds/InspiredForestSchoolTraining/wp-content/plugins/event-espresso-core-master-backup/core/admin/EE_Admin_Page.core.php(4098): EE_Config->update_espresso_config(false, false) #2 /homepages/24/d697786276/htdocs/clickandbuilds/InspiredForestSchoolTraining/wp-content/plugins/event-espresso-core-master-backup/caffeinated/admin/extend/registration_form/Extend_Registration_Form_Admin_Page.core.php(931): EE_Admin_Page->_update_espresso_configuration(‘Registration Fo…’, Object(EE_Config), ‘/homepages/24/d…’, ‘_update_reg_for…’, 931) #3 in /homepages/24/d697786276/htdocs/clickandbuilds/InspiredForestSchoolTraining/wp-content/plugins/event-espresso-core-master-backup/core/EE_Config.core.php on line 449
The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.


Josh

  • Support Staff

June 14, 2019 at 11:24 am

Two things:

1) You’ll need to set the reCAPTCHA option to protect the ticket selector, not the registration form

2) event-espresso-core-master-backup sounds like a GitHub build. You might find that if you switch to the current production build of Event Espresso 4 ( download from your account page and install that one ) the error will go away.


CVJS

June 15, 2019 at 3:34 am

Okay Josh&Tony, I think I’m getting closer to the issues here – thanks so much for your help btw!!
==
I have updated to the latest Espresso version and added reCAPTCHA as suggested. From looking at the database TXN_ID it is still showing between 1 and 3 brand new TFL (STS_ID) codes every minute.
Using Cloudflare, I turned this onto ‘Under Attach Mode’, requiring a Javascript challenge to new visitors, I have also tried turning off all plugin except Event Espresso to check if values of TXN_ID still rises…and it does.
Does this mean that it is something else generating these TXN_ID’s? I have checked the logs for the site and, as far as I can see, I am getting no visits at the same times as the TXN_ID is generated. At least I can rule out plugins and the CDN now. Anything else I can check please. Many thanks.


Josh

  • Support Staff

June 17, 2019 at 7:53 am

Hi,

If you deactivate the Event Espresso plugin for a few minutes do the additional TXN records continue to add on or do they stop?


CVJS

June 17, 2019 at 10:30 am

This reply has been marked as private.


Josh

  • Support Staff

June 17, 2019 at 10:50 am

Thanks for checking. Can you also try deactivating the Multi Event Registration add-on for a few minutes, and check to see if additional TFL transactions are being added while that add-on is deactivated? (with Event Espresso 4 core plugin activated).


CVJS

June 17, 2019 at 1:41 pm

This reply has been marked as private.


Josh

  • Support Staff

June 17, 2019 at 3:49 pm

Thanks for checking. Do you have another site that’s hosted on the same server where we could do some troubleshooting to find out what’s initiating new transactions?


CVJS

June 18, 2019 at 1:16 am

This reply has been marked as private.


Tony

  • Support Staff

June 18, 2019 at 4:03 am

The first thing I would do is set up a clean test site and install only EE and the matching add-ons that you have on the live site.

Add some events and some registration and then watch to see if transactions are created like on the live site.

I suspect it is some form of caching on the live site that is causing this although we already set no-cache headers and jump through various hoops to try and make sure the requests are not cached. So try with all caching disabled on the new site, then test again with caching enabled (note you’ll need to run some registrations whilst NOT logged in to initiate caching but even then you may not cause the same issue).


Tony

  • Support Staff

June 18, 2019 at 4:04 am

Also, another option is to clone the live site to a subsite/domain and see if the transactions continue to rise on that site.


CVJS

June 21, 2019 at 5:12 am

This reply has been marked as private.


Josh

  • Support Staff

June 21, 2019 at 6:44 am

Hi,

The information included there are unix timestamps for when each transaction step was initiated. So for example that first one’s “attendee_information” step was initiated at 06/21/2019 @ 11:10am (UTC). The zero at the end means the transaction did not proceed to “finalize_registration” step.

The support post ‘Reg Code and Event ID numbers missing sequence’ 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