Support

Home Forums Event Espresso Premium EE3 to EE4 Migration – Issues

EE3 to EE4 Migration – Issues

Posted: September 21, 2022 at 7:53 am


FASeminars

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:
Some events have different dates compared to EE3 data. For example EE3 https://functionalanatomyseminars.com/event-registration/?ee=719, screenshot: https://www.screencast.com/t/a6sihjSh8 compared to EE4 after migration https://fas2017stage.wpengine.com/events/kinstretch-level-1-certification-seminar-worldwide-online-seminar/. Do we need to re-do data migration to solve issue? We have large data (about half million records to update) and got a timeout during migration but found a way to continue & complete.

Issue 2:
EE4 seems to have a compatibility issue with Avada theme. Ticket table and QTY are missing, example: https://fas2017stage.wpengine.com/events/frs-internal-strength-model-certification-seminar-marlborough-uk-live-seminar/ . This is how it looks when we use a different theme (Omega): https://www.screencast.com/t/LEWk3HiOYArf. Any ideas why this would be as EE3 worked fine with Avada WP theme.

Thanks in advance for support. Depending on response from Tony or others, I can post this into a Premium ticket if warranted.

Thanks,

Andreo


Tony

  • Support Staff

September 21, 2022 at 8:51 am

Hi Andreo,

Issue 1:
Some events have different dates compared to EE3 data.

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’.

Do we need to re-do data migration to solve issue?

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:

define('EE_MIGRATION_STEP_SIZE', 30);

To your site’s wp-config.php file to reduce that down to 30 in my example but you can reduce it further if needed, the migrations will take a little longer but that should prevent timeouts if it is taking too long to process 50 currently.

Issue 2:
EE4 seems to have a compatibility issue with Avada theme.

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?


FASeminars

October 4, 2022 at 1:43 pm

This reply has been marked as private.


Tony

  • Support Staff

October 4, 2022 at 2:08 pm

You’re most welcome, I’m more than happy to answer any additional questions.


FASeminars

October 5, 2022 at 1:17 pm

This reply has been marked as private.


Tony

  • Support Staff

October 5, 2022 at 1:19 pm

Package up the current version you are suing and send it over, please.


FASeminars

October 5, 2022 at 3:15 pm

This reply has been marked as private.


FASeminars

October 13, 2022 at 1:13 pm

This reply has been marked as private.


Tony

  • Support Staff

October 14, 2022 at 5:25 am

My apologies for the delayed reply.

So the issue here is not actually a conflict, its from some custom code in your child theme:


//* Set custom Event Espresso ticket selector template
add_filter ('FHEE__EE_Ticket_Selector__display_ticket_selector__template_path', 'ee_custom_ticket_selector_template_location');
function ee_custom_ticket_selector_template_location(){
    return WP_CONTENT_DIR . '/themes/Avada-Child-Theme/ticket_selector_chart.template_show_remaining_tickets.php';
}

That’s code to replace the template used by the ticket selector for a custom version but your theme does not have a ticket_selector_chart.template_show_remaining_tickets.php template file.

Remove the above custom code and the ticket selector will display as expected 🙂


FASeminars

October 17, 2022 at 6:29 pm

This reply has been marked as private.


Tony

  • Support Staff

October 18, 2022 at 2:08 am

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 FHEE__ for filters and AHEE__ for actions so if your developers search for those they’ll find a bunch of hooks.

Here some details on the naming convention we now use:

https://github.com/eventespresso/event-espresso-core/blob/master/docs/A–Best-Practices/ee-actions-and-filters.md

Does that help?


FASeminars

October 18, 2022 at 11:00 am

This reply has been marked as private.


Tony

  • Support Staff

October 19, 2022 at 6:07 am

This reply has been marked as private.


FASeminars

October 24, 2022 at 12:21 pm

This reply has been marked as private.


Tony

  • Support Staff

October 25, 2022 at 12:53 pm

> We use this hook to create wp user, send welcome email, send data to sharpspring automation tool (https://app-3QNFZKDCN6.marketingautomation.services/webforms/receivePostback/MzawMDE3MDG0BAA/)

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 AHEE__EE_Single_Page_Checkout__process_attendee_information__end to create a WP User account so you could look into using that. You could then even use the WP User integration add-on to do some of your processing and hook into that if preferred, it depends when you want your code to run.

We use above hooks to update custom event meta data. What is the post_type name?

For EE Events… espresso_events

There’s also an EE hook:

FHEE__Events_Admin_Page___insert_update_cpt_item__event_update_callbacks

Which again allows you to hook into the CPT insert/update.

EE event doesn’t look like standard custom post type.

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

> that’s correct + I want to update store data (custom table) at https://functionalanatomyseminars.com/find-a-provider/

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 AHEE__EE_Registration__set_status__to_approved?


FASeminars

October 25, 2022 at 3:27 pm

This reply has been marked as private.


FASeminars

October 27, 2022 at 1:45 pm

This reply has been marked as private.


Tony

  • Support Staff

October 28, 2022 at 5:48 am

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.


FASeminars

October 28, 2022 at 11:19 am

This reply has been marked as private.


Tony

  • Support Staff

October 31, 2022 at 4:21 am

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?


FASeminars

November 1, 2022 at 12:53 pm

This reply has been marked as private.


Tony

  • Support Staff

November 3, 2022 at 1:12 pm

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.


FASeminars

November 4, 2022 at 11:36 am

This reply has been marked as private.


Tony

  • Support Staff

November 4, 2022 at 11:49 am

Looks normal

I can’t view the site, can you send over login details so I can take a look?

https://eventespresso.com/send-login-details/

We re-did migration from the live site.

From scratch on a new DB?

The migration logs look fine.


FASeminars

November 8, 2022 at 7:41 pm

This reply has been marked as private.


FASeminars

November 8, 2022 at 7:43 pm

This reply has been marked as private.


Tony

  • Support Staff

November 9, 2022 at 4:35 am

1 – Can you ask EE support if they know the EE 4 version of the below EE 3 query?

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.

\eea-wpuser-integration\EES_Espresso_My_Events.shortcode.php

Take a look at the _get_template_objects() method to se how the add-on pulls in registrations based on the current users att_id.

2 – I can’t find EE4 tables for wp_events_member_rel, wp_events_detail, wp_events_category_detail.

wp_events_member_rel – there isn’t one, the integration works differently here.

wp_events_detail – EE4 events are a custom post type, so the post itself if within wp_posts and joined to our custom tables using the post_id. The model system takes care of those joins for you so again, I recommend learning how the model system works.

wp_events_category_detail – EE4 categories are a custom taxonomy within WordPress, so categories are terms within the espresso_event_categories taxonomy.

3 – Does EE4 still use some of EE3 tables?

No, not at all.

4 – Also, is there a difference between EE4 event and payment status from EE3?

I need more specific details to be able to this, do they have an example?


FASeminars

November 9, 2022 at 10:37 am

This reply has been marked as private.


Tony

  • Support Staff

November 15, 2022 at 6:19 am

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?

Or, does the migration script copy EE3 event IDs somewhere, so we can do post migration update ourself?

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:

https://github.com/eventespresso/event-espresso-core/blob/master/docs/H–Data-Migration-System/data-migration-scripts.md#ee_data_migration_script_base-only

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).


FASeminars

November 25, 2022 at 3:35 pm

This reply has been marked as private.


Tony

  • Support Staff

November 28, 2022 at 5:55 am

Where do you save the map, what table?
Maybe it would be faster if we just query directly to db?

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 'ee_dms_map_' prefix although with other details from the tables the specific map is for.


FASeminars

December 7, 2022 at 9:44 am

This reply has been marked as private.


Tony

  • Support Staff

December 7, 2022 at 1:56 pm

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):

get_user_option('EE_Attendee_ID', $user->ID)

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.


FASeminars

December 14, 2022 at 9:18 am

This reply has been marked as private.


Tony

  • Support Staff

December 15, 2022 at 3:38 am

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.


FASeminars

December 20, 2022 at 7:59 am

This reply has been marked as private.


Tony

  • Support Staff

December 22, 2022 at 3:18 pm

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?

Could not find new registrations for old attendee 45409 when creating answer

Is saying EE4 could not find a related EE4 attendee for an answer in the EE3 data.

Could not find primary attendee’s new transaction. Current attendee is

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.

Could not find 4.1 question group id for 3.1 question group #0.

I’m not why a question group in EE3 would have an ID of 0. A non-existent question group?

Could not get-or-create state because no state name was provided for venue

No state name was provided fro a venue so EE4 couldn’t set one for the venue passed to it.

Same with country.

Could not find 4.1 event id for 3.1 event X

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.

Could not find payment method with PMD_type = ‘paid by phone ‘
Could not find payment method with PMD_type = ‘Added by Admin’

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.


FASeminars

January 3, 2023 at 12:29 pm

This reply has been marked as private.


FASeminars

January 5, 2023 at 3:43 pm

This reply has been marked as private.


FASeminars

January 11, 2023 at 7:25 am

This reply has been marked as private.


Tony

  • Support Staff

January 13, 2023 at 4:54 am

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/


FASeminars

January 13, 2023 at 3:54 pm

This reply has been marked as private.


FASeminars

January 17, 2023 at 12:59 pm

This reply has been marked as private.


FASeminars

January 23, 2023 at 7:41 am

This reply has been marked as private.


Gene Rowe

January 23, 2023 at 8:31 am

This reply has been marked as private.


Tony

  • Support Staff

January 24, 2023 at 7:17 am

This reply has been marked as private.


FASeminars

January 27, 2023 at 11:13 am

This reply has been marked as private.

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso