Support

Home Forums Event Espresso Premium Event Registration Database Error

Event Registration Database Error

Posted: January 4, 2016 at 10:19 am


CPAlberta

January 4, 2016 at 10:19 am

When people are attempting to register for on of our classes they’re getting a registration error, I’ve activated WP_DEBUG, and here’s the message I’m getting:

Notice: WPDB Error “Unknown column ‘Attendee_Meta.ATTM_ID’ in ‘field list'” while running wpdb method “get_results” with arguments [“SELECT Attendee_CPT.ID AS ‘Attendee_CPT.ID’, Attendee_CPT.post_title AS ‘Attendee_CPT.post_title’, Attendee_CPT.post_content AS ‘Attendee_CPT.post_content’, Attendee_CPT.post_name AS ‘Attendee_CPT.post_name’, Attendee_CPT.post_date AS ‘Attendee_CPT.post_date’, Attendee_CPT.post_excerpt AS ‘Attendee_CPT.post_excerpt’, Attendee_CPT.post_modified AS ‘Attendee_CPT.post_modified’, Attendee_CPT.post_author AS ‘Attendee_CPT.post_author’, Attendee_CPT.post_status AS ‘Attendee_CPT.post_status’, Attendee_CPT.comment_status AS ‘Attendee_CPT.comment_status’, Attendee_CPT.ping_status AS ‘Attendee_CPT.ping_status’, Attendee_Meta.ATT_fname AS ‘Attendee_Meta.ATT_fname’, Attendee_Meta.ATT_lname AS ‘Attendee_Meta.ATT_lname’, Attendee_Meta.ATT_address AS ‘Attendee_Meta.ATT_address’, Attendee_Meta.ATT_address2 AS ‘Attendee_Meta.ATT_address2’, Attendee_Meta.ATT_city AS ‘Attendee_Meta.ATT_city’, Attendee_Met in /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php on line 1799

Notice: WPDB AGAIN: Error “Unknown column ‘Attendee_Meta.ATTM_ID’ in ‘field list'” while running the same method and arguments as before. Automatically attempting to fix EE Addons DB in /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php on line 1799

Fatal error: Uncaught exception ‘EE_Error’ with message ‘WPDB Error: “Unknown column ‘Attendee_Meta.ATTM_ID’ in ‘field list'”‘ in /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php:1752 Stack trace: #0 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php(825): EEM_Base->_do_wpdb_query(‘get_results’, Array) #1 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php(723): EEM_Base->_get_all_wpdb_results(Array, ‘ARRAY_A’, NULL) #2 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Soft_Delete_Base.model.php(63): EEM_Base->get_all(Array) #3 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/relations/EE_Belongs_To_Relation.php(106): EEM_Soft_Delete_Base->get_all(Array) #4 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php(1966): EE_Belongs_To in /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php on line 1752

Help??


Tony

  • Support Staff

January 4, 2016 at 10:42 am

Hi Breanne,

It looks like the database did not update correctly.

Can you go to Dashboard -> Plugins.

Find Event Espresso in the list and de-activate the plugin (your event data will not be removed).

Then re-activate EE once again.

Also go to Event Espresso -> Maintenance -> System information.

Search for ‘wp_maintenance_mode’ on that page, does it say a .maintenance file is detected?


CPAlberta

January 4, 2016 at 10:44 am

Hi Tony,

When I reactivated I got this:
The following errors have occurred:
WordPress database error: [Incorrect table definition; there can be only one auto column and it must be defined as a key]
ALTER TABLE wp_r5rvde_esp_attendee_meta ADD COLUMN ATTM_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT
WordPress database error: [Key column ‘ATTM_ID’ doesn’t exist in table]
ALTER TABLE wp_r5rvde_esp_attendee_meta ADD PRIMARY KEY (ATTM_ID)

Stack Trace:#0 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Base.core.php(552): EEH_Activation::create_table(‘esp_attendee_me…’, ‘ATTM_ID INT(10)…’, ‘ENGINE=InnoDB ‘, false) #1 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Base.core.php(505): EE_Data_Migration_Script_Base->_create_table_and_catch_errors(‘esp_attendee_me…’, ‘ATTM_ID INT(10)…’, ‘ENGINE=InnoDB ‘, false) #2 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_DMS_Core_4_8_0.dms.php(120): EE_Data_Migration_Script_Base->_table_has_not_changed_since_previous(‘esp_attendee_me…’, ‘ATTM_ID INT(10)…’, ‘ENGINE=InnoDB ‘) #3 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Activation.helper.php(798): EE_DMS_Core_4_8_0->schema_changes_before_migration() #4 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Activation.helper.php(90): EEH_Activation::create_database_tables() #5 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/EE_System.core.php(344): EEH_Activation::initialize_db_and_folders() #6 [internal function]: EE_System->initialize_db_if_no_migrations_required(”) #7 /home/boreilly/cpalberta.com/wp-includes/plugin.php(525): call_user_func_array(Array, Array) #8 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/EE_System.core.php(729): do_action(‘AHEE__EE_System…’) #9 [internal function]: EE_System->perform_activations_upgrades_and_migrations(”) #10 /home/boreilly/cpalberta.com/wp-includes/plugin.php(525): call_user_func_array(Array, Array) #11 /home/boreilly/cpalberta.com/wp-settings.php(392): do_action(‘init’) #12 /home/boreilly/cpalberta.com/wp-config.php(96): require_once(‘/home/boreilly/…’) #13 /home/boreilly/cpalberta.com/wp-load.php(37): require_once(‘/home/boreilly/…’) #14 /home/boreilly/cpalberta.com/wp-admin/admin.php(31): require_once(‘/home/boreilly/…’) #15 /home/boreilly/cpalberta.com/wp-admin/plugins.php(10): require_once(‘/home/boreilly/…’) #16 {main}
EEH_Activation – create_database_tables – 803
WordPress database error: [Duplicate key name ‘first_model’]
ALTER TABLE wp_r5rvde_esp_extra_join ADD KEY first_model (EXJ_first_model_name, EXJ_first_model_id)
WordPress database error: [Duplicate key name ‘second_model’]
ALTER TABLE wp_r5rvde_esp_extra_join ADD KEY second_model (EXJ_second_model_name, EXJ_second_model_id)

Stack Trace:#0 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Base.core.php(552): EEH_Activation::create_table(‘esp_extra_join’, ‘EXJ_ID INT(11) …’, ‘ENGINE=InnoDB ‘, false) #1 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_Data_Migration_Script_Base.core.php(422): EE_Data_Migration_Script_Base->_create_table_and_catch_errors(‘esp_extra_join’, ‘EXJ_ID INT(11) …’, ‘ENGINE=InnoDB ‘, false) #2 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/data_migration_scripts/EE_DMS_Core_4_8_0.dms.php(239): EE_Data_Migration_Script_Base->_table_is_new_in_this_version(‘esp_extra_join’, ‘EXJ_ID INT(11) …’, ‘ENGINE=InnoDB ‘) #3 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Activation.helper.php(798): EE_DMS_Core_4_8_0->schema_changes_before_migration() #4 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/helpers/EEH_Activation.helper.php(90): EEH_Activation::create_database_tables() #5 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/EE_System.core.php(344): EEH_Activation::initialize_db_and_folders() #6 [internal function]: EE_System->initialize_db_if_no_migrations_required(”) #7 /home/boreilly/cpalberta.com/wp-includes/plugin.php(525): call_user_func_array(Array, Array) #8 /home/boreilly/cpalberta.com/wp-content/plugins/event-espresso-core-reg/core/EE_System.core.php(729): do_action(‘AHEE__EE_System…’) #9 [internal function]: EE_System->perform_activations_upgrades_and_migrations(”) #10 /home/boreilly/cpalberta.com/wp-includes/plugin.php(525): call_user_func_array(Array, Array) #11 /home/boreilly/cpalberta.com/wp-settings.php(392): do_action(‘init’) #12 /home/boreilly/cpalberta.com/wp-config.php(96): require_once(‘/home/boreilly/…’) #13 /home/boreilly/cpalberta.com/wp-load.php(37): require_once(‘/home/boreilly/…’) #14 /home/boreilly/cpalberta.com/wp-admin/admin.php(31): require_once(‘/home/boreilly/…’) #15 /home/boreilly/cpalberta.com/wp-admin/plugins.php(10): require_once(‘/home/boreilly/…’) #16 {main}
EEH_Activation – create_database_tables – 803


CPAlberta

January 4, 2016 at 10:47 am

A .maintenance file is not detected. (for the other part of your instructions)


Tony

  • Support Staff

January 4, 2016 at 11:14 am

Hmm, is this a new activation or an update to a previous install?


CPAlberta

January 4, 2016 at 11:27 am

We had installed on a test server and then moved over to this URL. I’ve done all updates so far.


Tony

  • Support Staff

January 4, 2016 at 11:44 am

Its odd because in one request it seems the DB column can not be created, then in another its stating duplicates.

Can you check with your hosting provide that your normal database user has permissions to alter the tables on that server?

How was the database transferred over from the test site to live?


CPAlberta

January 4, 2016 at 12:08 pm

I think the permissions are ok. We’re hosting with Dreamhost and I’m not seeing any restrictions.

For transferring the database I pulled all the files over FTP


Josh

  • Support Staff

January 4, 2016 at 12:13 pm

Hi Breanne,

It doesn’t sound like the database was properly transferred. The database resides in a set of mySQL tables and isn’t usually something that can be copied using FTP. Had anyone used a tool like phpmyadmin or WP migrate db to copy over the Event Espresso database tables from the dev site to the live site? If so, were the options tables and other tables like the posts table also copied over?

At any point after migrating the site did the registration process actually work?


CPAlberta

January 5, 2016 at 12:45 pm

I’ve used phpmyadmin now to ensure the database from the test site was transferred over. This hasn’t made any difference though.

(I used WP migrate db to copy everything from the test site and then imported the file using phpmyadmin – I then deactivated and reactivated my event espresso and I’m still having the same error in word press and on the site itself.)

I’m unsure if the registration process worked after migrating, we haven’t had any tickets purchased, but we hadn’t been promoting it and I just recently started seeing the abandoned transactions and was told that people were getting an error.


Josh

  • Support Staff

January 5, 2016 at 2:17 pm

If it’s working on the staging server, and the live server has exactly the same database, then it’s an indication the live server isn’t configured to allow PHP scripts to alter some of the database tables. Another thing you can check is to see what happens if you try to do something like create an event or edit an Event notification in the Messages editor.


CPAlberta

January 5, 2016 at 2:32 pm

It seems to still be working on the test site, yes. Does it matter that both sites are live? (we didn’t have access to a staging server so just created everything on a URL that we’re not using) I transferred our support key over to the new site, so it’s not entered on the old site, but I thought I’d double check just in case that could be an issue.

I can’t see anything different with the server – both sites are running through dreamhost and seem to have all the same settings, but I’ll check with dreamhost to be sure.

(the test site was http://www.cerebralpalsyalberta.com in case you want to take a look – it doesn’t have nearly the number of events entered as our actual site, but it seems like registering for the Gala (May 7) is working and it’s not on http://www.cpalberta.com)


CPAlberta

January 5, 2016 at 2:33 pm

Oh – and most of the events were created on the current site – I didn’t encounter any errors.


CPAlberta

January 5, 2016 at 2:44 pm

I have confirmed that I have full permissions. The only thing that Dreamhost suggested I might need to do is add a public IP to a list of allowable clients if required.


Josh

  • Support Staff

January 5, 2016 at 4:09 pm

It doesn’t matter if both sites are live with the domain/license key connection, it doesn’t impair the functionality of the plugin.

I’m not sure why Dreamhost would require a public IP list. Are there security restrictions set up on the live site, either at the server level or via a WordPress plugin?


CPAlberta

January 5, 2016 at 4:13 pm

No security restrictions on the server or via a plugin.

I think it was just a suggestion from Dreamhost as a possible issue, but since that wasn’t done with the other site I’m assuming it’s not required.


Josh

  • Support Staff

January 5, 2016 at 8:02 pm

Do both databases have the same wp_r5rvde_ table prefix? What may help us investigate this further is a export of both databases so we can compare any differences? Can you send a database dump from both databases to the support at eventespresso.com email address?


CPAlberta

January 5, 2016 at 8:25 pm

I’ve emailed the databases to that email address. I did notice that the old data base has a different prefix, and the new data base seems to have to prefixes, the wp_r5rvde as well as wp_nz4fhb (which is the prefix on the old data)


Josh

  • Support Staff

January 5, 2016 at 9:30 pm

Yes, you are correct, and the tables having two different prefixes are likely part of what is causing the issues you’re seeing. The old data isn’t likely being used here at all since it has the old prefix.

You can also see there are duplicates of the same tables, like two _posts tables, just with different prefixes. There should only be one _posts table on one site. I’m not sure how all this happened, but it seems like more of a data migration issue where the data wasn’t properly moved from one site to the other.
Technically WordPress will only use the table prefix that matches what’s set in the wp-config.php file. The way forward here might be to just go with the old data, and if you go that route, you just change what’s set as the database prefix in the wp-config.php file to match the table prefix of the tables copied over from the old site.

Will that work for you?


CPAlberta

January 5, 2016 at 9:38 pm

If I go with the old data do I lose all the events I’ve created in the new site? Or the forms? What is contained in the data? Nearly all the events that I’ve created have been in the new one, losing those would be quite the headache.


Josh

  • Support Staff

January 6, 2016 at 10:15 am

There was no reason to copy over the data from the staging site then. I sent you some instructions via email on how to fix that one bad table.

The support post ‘Event Registration Database Error’ 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