Posted: September 21, 2022 at 7:53 am
Hello, We have completed EE3 to EE4 data migration plus shortcode updates and have discovered some issues which need assistance or guidance: Issue 1: Issue 2: Thanks in advance for support. Depending on response from Tony or others, I can post this into a Premium ticket if warranted. Thanks, Andreo |
|
Hi Andreo,
That event’s dates are yesterday which is when I assume you ran the migration, which would leave me thinking the request timed out when generating the datetimes for that event and they defaulted to ‘now’.
Other than manually fixing the events with this issue yes you would need to re-run the migration and see if it happened again. We have an option to change the migration step size if the current batches are causing timeouts. The default step size is 50 but you can add:
To your site’s
That’s a new one on me. Especially as its only happening with the ticket selector. You’ve asked why EE3 worked and EE4 doesn’t here and its all connected. With EE3 we basically a complete template system within EE3 itself, which sounds great but it meant that all of your event output was totally separate from your standard theme output. The theme did its own thing and EE3 did its own thing outside of that to output events, reg forms etc. The look would be completely different becuase of the fact they they are indeed totally separate. With EE4 we took a more integrated approach, EE4 events are a custom post type (infact they are a hybrid, but do things more of ‘the WP way’ than EE3 does) and we hook into the theme’s output for posts (because that’s exactly what they are) in inject the event content on the fly. That means you get more integration with themes, event posts look more like the rest of the site out of the box and so on. Both have their pros and cons but integrating with the WP way and theme’s was a big plus for EE4 and one of the design choices we made very early on when designing the system. Now, the reason that only the ticket selector is missing is interesting is because of how the content injection works. We sometimes see themes doing crazy things in the background and running the_content multiple times for a single post. EE not wanting to inject multiple sets of data will only inject the event details once on the_content and then skip if it runs again… however, that doesn’t seem to be the case here because all of the other even content is being injected and only the ticket selector is missing. I’ve not seen the ticket selector (and only the ticket selector) being missing from a request, what’s more is the ‘Register now’ button…. IS part of the ticket selector, so its injected but not all of it? It will make sense as to why when the issue is found, but right now, its an odd one! Can you send me a copy of the version of Avada you are using so I can test this locally and see if I can reproduce? |
|
This reply has been marked as private. | |
You’re most welcome, I’m more than happy to answer any additional questions. |
|
This reply has been marked as private. | |
Package up the current version you are suing and send it over, please. |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
My apologies for the delayed reply. So the issue here is not actually a conflict, its from some custom code in your child theme:
That’s code to replace the template used by the ticket selector for a custom version but your theme does not have a Remove the above custom code and the ticket selector will display as expected π |
|
This reply has been marked as private. | |
We don’t currently have a list of hooks within EE4, partially because we have a huge number of hooks available within EE4. We have roughly 1500 Filters and 1000 Actions hooks within core so that’s not including WP core hooks or add-ons, We also have dynamic hooks for use within a section of code that can be used for various stages. So at this point the list would basically end up being the same as searching through the codebase. We use the prefix Here some details on the naming convention we now use: Does that help? |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
But when? Have you run through EE4 registrations to see how they work, it works very differently to EE3 so at what point during an EE4 registration would you want to do the above? The EE4 WP user integration add-on hooks into
For EE Events… There’s also an EE hook:
Which again allows you to hook into the CPT insert/update.
You’ll need to explain this further, Event Espresso does indeed use ‘standard’ custom post types to some degree, however we also use custom tables to store a LOT of out data. The best thing you can do when working with EE4 is learn how our model system works: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System
So in EE4 that would not be solely based on payment but rather registration status, so when the registration status is set to Approved. So maybe |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
Hi there, What dates have been set within the corresponding EE3 event? Can you add a screenshot? I can’t view the above site, we don’t keep login credentials for any longer than necessary to fix the issue they were sent over for, so if you have previously sent login credentials those would have already been deleted. |
|
This reply has been marked as private. | |
Is the screenshot you’ve provided from EE3 or EE4? (Because you can change the columns on the list tables its difficult to know for sure, it looks like thats your EE4 events?) So in the EE3 event, what dates were set? |
|
This reply has been marked as private. | |
Hmm, strange, nothing stands out there. I’ve just tested those dates and got an expired EE4 event. What happens when you edit the EE4 event? You mentioned previously that you had timeouts during a migration, is the above from that migration? If not, how did you rerun the migration? The event status showing as inactive means EE couldn’t find an EE_Event object for the Event_ID given, very strange. |
|
This reply has been marked as private. | |
I can’t view the site, can you send over login details so I can take a look? https://eventespresso.com/send-login-details/
From scratch on a new DB? — The migration logs look fine. |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
EE4 works differently with WP Users so this query doesn’t work the same way as aboe and this is really where they need to start digging into the EE4 Models system: https://github.com/eventespresso/event-espresso-core/blob/master/docs/G–Model-System/ The above EE3 query is pulling attendee from the wp_events_attendee based on a relationship table (wp_events_member_rel). EE4 registrations don’t work that way, you would pull registrations based on the EE_Contact linked to the user account. The simplest example of this in use is within the EE4 User integration add-on.
Take a look at the
No, not at all.
I need more specific details to be able to this, do they have an example? |
|
This reply has been marked as private. | |
Apologies for the delay, I’ve been doing a little digging into the migrations. I did get the login details and some of your events are set to draft which is likely why they show as inactive, I’m not making changes to the site, so can you check what the status of one of those events was EE3?
The migration scrips do indeed save a map of the Primary Keys from the old tables to the new ones, take a look at the developer documentation on this here: get_mapping_new_pk() sounds like the method you need here. I’d recommend opening up a github issue on the above repo for this and outline what it is you are trying to do, one of our developers may be able to provide some details (although I can’t guarantee that). |
|
This reply has been marked as private. | |
Without meaning for this to come across the wrong way, if you are asking where it is saved (the function to save the map is in the same file as the function I mentioned) then it’s likely not going to be quicker trying to call it directly. Did you open up an issue for this on the Repo? One of our developers should be able to point you in the right direction here. There is also the option of adding a hook in the migration script (even if you do it yourselves) on each loop over the migration for events passing the old and new event ID’s into the hook to allow you to do this yourself via said hook. As it’s a migration and only happening once it’s less of an issue than the usually one of ‘hacking up core’, although still generally not recommended. — To actually answer your question it’s saved within an option within the database and uses the migration |
|
This reply has been marked as private. | |
They work differently in EE4. EE4 registrations create an EE_Contact to store the ‘registrant’ details, the registration is linked to the contact using the ATT_ID for the contact. The WP user integration add-on links a specific EE_Contact to a WP User using a user option (aka usermeta):
All registrations made by a specific user are not tied to that user, only registration where the First Name, Last Name and Email address matched the EE_Contact. |
|
This reply has been marked as private. | |
Hmm, good question and not currently, no. You could run a script looping over every registration, pulling the contact for the registration and then comparing the first name, last name and email address to your WP_users and if finds one, create the user meta value. The above will happen for each individual user as they register onto the next event as it stands. The WP User integration add-on will hook into the checkout process, search for a WP user account with details that match the first name, last name and email address provided within the personal information and link to contact to the user but we don’t have a batch process to do this for all current registrations/WP users as it stands. |
|
This reply has been marked as private. | |
Hi Andreo, Most of those ‘errors’ aren’t really errors, they are advisories from the migration saying ‘We didn’t expect X, but we did Y anyway’. I’ll happily provide feedback on those errors, but what are they looking for here?
Is saying EE4 could not find a related EE4 attendee for an answer in the EE3 data.
The EE3 registration_id didn’t relate to an EE3 attendee and TXN_ID was null, so couldn’t relate to a txn. EE4 creates an attendee for those individual registrations anyway. Both of the above ‘errors’ could be related to registrations having been removed from EE3 previously.
I’m not why a question group in EE3 would have an ID of 0. A non-existent question group?
No state name was provided fro a venue so EE4 couldn’t set one for the venue passed to it. Same with country.
Likely events that have been removed from the EE3 database but have registrations related to it, EE4 can’t link a registration to an event if it didn’t create an event during the event migrations.
Those a custom values entered into EE3 for payments, EE4 can’t find related payment methods for them (expected in this case) and will have just set them to unknown. |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
My apologies for the delayed reply, for some reason the above didn’t show in my queue. I can’t tell you why those are different from the info available to me. If the EE3 individual events are part of a recurring series it will create individual date times and tickets within an event, but I can’t tell if that’s part of the issue with your setup here. Can I take another look in the admin? I know you sent credentials over previously but we try not to keep them for any long than needed for the specific issue we are looking into so I no longer have those. You can resend using this form: https://eventespresso.com/send-login-details/ |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
Hi there, Yes, I received your DB tables, support doesn’t work over the weekend so the first time I looked at them was Monday evening. Migrations take a fair bit of troubleshooting and I’m confused with a couple of steps on this so asked for some feedback. I’ll let you know as soon as I have any details on this. |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
Hi Andreo, Just to keep you updated, I’ve been investigating this and currently running another local migration, as you know you have a lot of data so it takes a while. I’ll post more when the migration has finished. |
|
Ok, so this is an issue that is fairly obvious now that it’s been found and I’m surprised this hasn’t come up before. The issue with those missing events is due to some of your events not having a start/end time set. The migration script is expecting a start/end for each individual event passed to it, when a value isn’t passed it breaks the datetime creation. The bigger picture for this is we can’t really assume start/end times for an events either as migrations could then create (many) events with start times that simply aren’t correct which are then available to the public which means the best way to fix this is to go through your EE3 events and confirm a start/end time is on them all, then re-run migrations. I’ll create a ticket to discuss this further but knowing the above in terms of making assumptions on start/end times I can’t see a fix for this being release ‘soon’. |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
This reply has been marked as private. | |
Yes, both the start and end times must be set otherwise EE4 has no idea when the end starts or end. |
|
This reply has been marked as private. | |
Gives you a list of all of the events where there is no row within Loop over each ID and add a start and end time within
That should the fairly easy to mock up within PHP π Just make sure you have a backup of the database, or at least Note the above is doing this in the EE3 tables so that you can re-run the migrations again and EE4 sets up the datetimes correctly. |
|
This reply has been marked as private. | |
This reply has been marked as private. | |
It’s not just because of the new ID, the way in which registrations relate has now changed. In EE3 the WP_user, event_ID and attendee_id were stored within In EE4 it doesn’t work like that, a Contact is a ‘person’ and multiple registrations can be assigned to a contact, they will all show as that person. The WP User integration add-on adds a single ‘EE_Attendee_ID’ usermeta value to each a user account, that is the ATT_ID for a contact, so it links a single contact to a single WP_User. So currently there is no method within core to convert the events_member_rel table to work within EE4 in the same way it did with EE3. It would be possible to create some custom code to loop over all users and search for an EE_Contact that matches their user account exactly and then assign the ATT_ID to the same user meta field, but that’s still not really a conversation of that query so I’m not sure if that will suit your needs. What will happen right now is if a user creates a registration whilst logged in and their EE_contact already has registrations assigned to it, then once they’ve registered onto an event all of their previous registrations would show up. |
|
The support post ‘EE3 to EE4 Migration – Issues’ 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.