Support

Home Forums Event Espresso Premium Migrating from EE3 to EE5 EE_DMS_4_6_0_gateways Error

Migrating from EE3 to EE5 EE_DMS_4_6_0_gateways Error

Posted: July 8, 2024 at 1:55 pm

Viewing 19 reply threads


amy alexander

July 8, 2024 at 1:55 pm

Hi,
I’m trying to update a site to EE5. I duplicated it to a new wordpress install that has the latest versions and PHP 8.

I was getting an error though on the migration because the PHPInfo wasn’t available (my host FlyWheel disables it).

So I downloaded it to WP Local and was able to reset the database and try again, but now I get this error with WP_Debug on:

Deprecated: Creation of dynamic property EE_DMS_4_6_0_gateways::$_currency_payment_method_table_name is deprecated in /www/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Stage.core.php on line 123

My PHP logs look like this:
[08-Jul-2024 19:32:45 UTC] PHP Fatal error: Uncaught TypeError: EE_DMS_4_1_0_gateways::_get_old_gateway_option(): Return value must be of type ?string, array returned in /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_gateways.dmsstage.php:194
Stack trace:
#0 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_gateways.dmsstage.php(92): EE_DMS_4_1_0_gateways->_get_old_gateway_option(‘Aim’)
#1 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Stage.core.php(66): EE_DMS_4_1_0_gateways->_migration_step(8)
#2 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Base.core.php(348): EE_Data_Migration_Script_Stage->migration_step(8)
#3 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/EE_Data_Migration_Manager.core.php(716): EE_Data_Migration_Script_Base->migration_step(10)
#4 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/EE_Data_Migration_Manager.core.php(828): EE_Data_Migration_Manager->migration_step()
#5 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/admin_pages/maintenance/Maintenance_Admin_Page.core.php(385): EE_Data_Migration_Manager->response_to_migration_ajax_request()
#6 /Users/reykroona/Local Sites/streamline-health/app/public/wp-includes/class-wp-hook.php(324): Maintenance_Admin_Page->migration_step(”)
#7 /Users/reykroona/Local Sites/streamline-health/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
#8 /Users/reykroona/Local Sites/streamline-health/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 /Users/reykroona/Local Sites/streamline-health/app/public/wp-admin/admin-ajax.php(192): do_action(‘wp_ajax_migrati…’)
#10 {main}
thrown in /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_gateways.dmsstage.php on line 194

Do you have any other trips for how to complete this migration?

Thank you-

Rey


Tony

  • Support Staff

July 8, 2024 at 5:34 pm

Hi Rey,

Judging from your site’s path, you’re testing this locally right now, right? (That’s a good thing, I’m just confirming)

Using your error log I can see where the issue in the code is coming from and can apply a patch to a test version of EE5 for you to test out on your site if you’d like to try it?


amy alexander

July 8, 2024 at 8:25 pm

Hi Tony,
Yes, I’m testing locally.

That would be great if that’s something you can provide, thanks so much!

Rey


Tony

  • Support Staff

July 9, 2024 at 5:18 am

This reply has been marked as private.


amy alexander

July 9, 2024 at 8:54 am

Thank you, that did take me quite a bit further, but I recieved another error, this time it says:

>migration_step, EE_DMS_4_1_0_category_details->_migration_step, wp_insert_term
[09-Jul-2024 14:53:10 UTC] PHP Fatal error: Uncaught TypeError: EE_DMS_4_1_0_attendees::_sum_old_attendees_on_old_txn(): Return value must be of type int, null returned in /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_attendees.dmsstage.php:1068
Stack trace:
#0 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_attendees.dmsstage.php(710): EE_DMS_4_1_0_attendees->_sum_old_attendees_on_old_txn(Array, true)
#1 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/4_1_0_stages/EE_DMS_4_1_0_attendees.dmsstage.php(340): EE_DMS_4_1_0_attendees->_insert_new_registrations(Array, 10146, 1)
#2 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Stage_Table.core.php(50): EE_DMS_4_1_0_attendees->_migrate_old_row(Array)
#3 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Stage.core.php(66): EE_Data_Migration_Script_Stage_Table->_migration_step(8)
#4 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Base.core.php(348): EE_Data_Migration_Script_Stage->migration_step(8)
#5 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/EE_Data_Migration_Manager.core.php(716): EE_Data_Migration_Script_Base->migration_step(10)
#6 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/core/EE_Data_Migration_Manager.core.php(828): EE_Data_Migration_Manager->migration_step()
#7 /Users/reykroona/Local Sites/streamline-health/app/public/wp-content/plugins/event-espresso-core-reg/admin_pages/maintenance/Maintenance_Admin_Page.core.php(385): EE_Data_Migration_Manager->response_to_migration_ajax_request()
#8 /Users/reykroona/Local Sites/streamline-health/app/public/wp-includes/class-wp-hook.php(324): Maintenance_Admin_Page->migration_step(”)
#9 /Users/reykroona/Local Sites/streamline-health/app/public/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
#10 /Users/reykroona/Local Sites/streamline-health/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#11 /Users/reykroona/Local Sites/streamline-health/app/public/wp-admin/admin-ajax.php(192): do_action(‘wp_ajax_migrati…’)
#12 {main}

Thank you again!

Rey


Tony

  • Support Staff

July 9, 2024 at 2:49 pm

Hmmmm, any chance I can get a copy of your EE3 tables?

I don’t need your site’s whole DB but if I can get the tables with the events_ prefix I can test this migration locally to see whats happening.

The above error means there’s no primary registrant… but there should be one.


amy alexander

July 9, 2024 at 3:19 pm

This reply has been marked as private.


Tony

  • Support Staff

July 10, 2024 at 8:39 am

This reply has been marked as private.


amy alexander

July 10, 2024 at 10:53 am

Thanks, this got migrated well with the new version.

I’m now getting an error on the Backend Dashboard Events page that says:
“Could not create instance of class Term from row Term.term_id=0&Term.name=First+Aid%2C+Adult+CPR%2FAED&Term.slug=lay-person-first-aid-adult-cp-2&Term.term_group=0&Term_Taxonomy.term_taxonomy_id=0&Term_Taxonomy.term_id=0&Term_Taxonomy.taxonomy=espresso_event_categories&Term_Taxonomy.description=&Term_Taxonomy.parent=0&Term_Taxonomy.count=0 EEM_Base – _create_objects – 5298”

Should I start a new thread for this?

Thanks!

Rey


Tony

  • Support Staff

July 10, 2024 at 11:08 am

Which page are you seeing this on?

When you migrated over, did you start with a fresh database or continue through with the migration after the fatal?

I ran the migrations using your EE3 data but I’m not getting the above error on my end


amy alexander

July 10, 2024 at 11:26 am

I deleted the EE4 data and started fresh. but maybe I’ll try a fresh copy from the original EE3 site and see if that helps, there’s been a lot of attempts.


Tony

  • Support Staff

July 10, 2024 at 11:31 am

A lot of EE4 entities are Custom Post Types or standard WP features. Terms are within a custom taxonomy within the WP tables, so ‘partial’ migrations can sometimes cause weird issues if they fatal at the ‘wrong’ time.

If you can try a ‘clean’ migration we an at least rule that out before we start chasing ghosts.


amy alexander

July 10, 2024 at 12:19 pm

I did a fresh copy of the existing EE3 site and still get the error. It’s on this page, btw. I’m going to try a complete fresh wordpress install and only bring over that data and see what happens.

This is the page I’m on btw:
https://streamlinehealth.local/wp-admin/admin.php?page=espresso_events


amy alexander

July 10, 2024 at 1:04 pm

Ok, I did a fresh WordPress install and copied only the Events database, installed EE3, and the Migration Fix EE5 and it worked. So I think I can either copy the new databases over (These are the ESP tables correct?) or start migrating over all the other plugins, themes, etc. But I think I’m out of the woods at lease. Thanks so much!

Rey


Tony

  • Support Staff

July 10, 2024 at 1:37 pm

I did a fresh copy of the existing EE3 site and still get the error. It’s on this page, btw.

Hmmm, to save me running search and replace, can you use UpDraft to create a DB backup and send be that?

I’ll import the site locally and run a migration to see if I get the error.

So I think I can either copy the new databases over (These are the ESP tables correct?)

If I understand what you mean here, you cannot do it that.

You can’t run a migration on site A and copy the _esp_ tables over to another site. EE events, attendees, contacts and other data are custom post types so they are stored within the wp_posts table.

In short you can’t copy EE4 tables over from one site to another.

EE3 events were all stored separately from WP in the _events_ tables, those events weren’t custom post types so moving just those tables could be done, not anymore (using CPT’s for EE4’s data has its pros… but also some cons and this is one).

Its technically possible to create Site B, import the EE3 tables from Site A into Site B’s database and then run the migrations for EE4 there, you get one shot at that, you can’t ‘re-migrate’ later.

or start migrating over all the other plugins, themes, etc.

Copy site A, install EE5 and run through all the migrations. Issues come from that we can investigate.

If you try running the migrations on Site A and then copying tables over to SIte B… you’re in for a rough ride!


amy alexander

July 10, 2024 at 3:27 pm

This reply has been marked as private.


amy alexander

July 22, 2024 at 6:04 pm

Hi, I’m starting to get back into this a little. I see what you mean a little better now.

I noticed in the WP-Terms database, post-migration it’s adding a new row with a term-id of 0 that is from the event-category. So I think maybe something in the migration at that point isn’t right and it’s only migrating 1 category.

Is that helpful at all?

Rey


Tony

  • Support Staff

July 23, 2024 at 5:46 am

Hi Rey,

So… there is an issue with migration here.

The current error you are getting is because there is a row within your terms table with an ID of 0 (there should never be an item with row ID 0, they all start at 1) which then throw a fatal.

The ‘fix’ for that specific error is to simply remove that row from the table (it looks like its a dupe)… which can be done in the wp_terms and just delete the row with term_id 0 using PHPMyAdmin.

You will then also need to delete a similar row within wp_term_taxonomy, delete the row where term_taxonomy_id is 0.

That will prevent the above fatal error from happening and will get EE loading on your site.

However, this isn’t really a fix becuase although the events will now load, something has broken the migration here as those rows should exist and (I suspect becuase of that issue) none of the event has categories set on them.

So the above gets you to loading to EE4 but becuase terms are within the WP tables I need a copy of the site from before you ran the EE4 migrations so I can work through the migrations and track the queries to see what is tripping them up on your site. I don’t need another full copy of the site but can you send me a copy of the DB from before the migrations were run?

I’ll dig into this more and figure out why they aren’t being set up correctly rather than the band-aid fix above.


amy alexander

July 23, 2024 at 8:58 am

This reply has been marked as private.


Tony

  • Support Staff

July 23, 2024 at 9:41 am

Do you have a version of the site running EE3?

If so can you dump the DB using Updraft and send me that version, please?

It’s just much quicker to be able to import it using the above without having to work through the error being thrown by a dump.

For example when I import the above locally, it currently throws:

USE 'local';
MySQL said: Documentation

#1049 - Unknown database 'local'

Which, yes, I can fix, but Updraft can just handle all of it out the box and I can get to debugging 🙂

Viewing 19 reply threads

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

Event Espresso