Support

Home Forums Event Espresso Premium Registration Error – "WPDB error: "Field 'EventID' doesn't have default value"

Registration Error – "WPDB error: "Field 'EventID' doesn't have default value"

Posted: May 21, 2019 at 1:13 pm


a608237

May 21, 2019 at 1:13 pm

Hello,

Event Espresso 4.9.89.p was working fine for many months. Recently, I’ve switched themes and I can no longer registered for events. Switching the theme back to the original also returned the same error:

Notice: WPDB Error "Field 'EventID' doesn't have a default value" while running wpdb method "insert" with arguments ["wp_esp_registration",{"EVT_ID":600,"ATT_ID":0,"TXN_ID":39,"TKT_ID":5,"STS_ID":"RIC","REG_date":"2019-05-21 19:10:25","REG_final_price":0,"REG_paid":0,"REG_session":"4caa8e04c38911a054bb2a5e778b2b5f","REG_code":"39-5-1-257b","REG_url_link":"1-257b50c2268e556a87b52a18721c3978","REG_count":1,"REG_group_size":1,"REG_att_is_going":false,"REG_deleted":false},["%d","%d","%d","%d","%s","%s","%f","%f","%s","%s","%s","%d","%d","%d","%d"]]. Automatically attempting to fix EE Core DB in /var/www/html/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php on line 2377

Notice: WPDB AGAIN: Error "Field 'EventID' doesn't have a default value" while running the same method and arguments as before. Automatically attempting to fix EE Addons DB in /var/www/html/wp-content/plugins/event-espresso-core-reg/core/db_models/EEM_Base.model.php on line 2377

Please assist in solving this issue. Thanks in advance.


Josh

  • Support Staff

May 21, 2019 at 2:47 pm

Hi,

May I ask do you have any custom code that adds an “EventID” field? The reason I ask is because I did a string search for that field in EE4 core and no match was returned.


a608237

May 21, 2019 at 3:22 pm

HMMM.. you “triggered” a thought that might guide me to the solution.

I made a trigger on the wp-esp-registration table that tries to insert a record into a table containing EventID… I will look into this and report back later


a608237

May 21, 2019 at 3:32 pm

It turns out I had a trigger on wp-esp-registration which wrote into a table containing ‘EventID’, except I didn’t provide a value for EventID and it is a non-nullable column, hence the error.

I should’ve looked alot harder, thanks for the assist.

The support post ‘Registration Error – "WPDB error: "Field 'EventID' doesn't have default value"’ 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