Step 8 – newsletter_subscriber error

I have problems with step 8:
[Processing][run] in step #8: .
Status: fail
Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘subscriber_firstname’ doesn’t have a default value. The SQL statement executed was: INSERT INTO `mgd8_newsletter_subscriber` (`store_id`, `customer_id`, `subscriber_status`, `subscriber_confirm_code`, `subscriber_email`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4)
 
Do you know what can be the problem here?

5 answers

Profile photo of Mall Staff 184060.00 $tone August 29, 2022
Public

Hi there,

Message: CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]: General error: 1364 Field ‘subscriber_firstname’ doesn’t have a default value. The SQL statement executed was:

Which version is your M2 instance? It seems the field named ‘subscriber_firstname‘ is not a core field in the table named ‘newsletter_subscriber‘ in your M2 database.
To solve the issue you mentioned, you must manually set a default value for that custom field.
Once done, you can continue with data migration in step #8 by running the CLI command:

php -f bin/ubdatamigration run --step=8;

 
Regards,
Mall.
 

#1
Profile photo of Mall Staff 184060.00 $tone August 30, 2022
Public

Hi there,

How can I set the default value for that field?

Please try running the following SQL in your M2 database to set a default value for the field named ‘subscriber_firstname’:

ALTER TABLE mgd8_newsletter_subscriber
ALTER subscriber_firstname SET DEFAULT NULL;

 
Regards,
Mall.

#3
Profile photo of caos989 370.00 $tone August 30, 2022
Public

 
I set the subscriber_firstname with PHPmyAdmin to defaul: Null
After that the same error cames with subscriber_lastname so i changed this too. Now it’s working. Thx
 

#4
Profile photo of ubdev Staff 98590.00 $tone August 31, 2022
Public

Hi,

I set the subscriber_firstname with PHPmyAdmin to defaul: Null
After that the same error cames with subscriber_lastname so i changed this too. Now it’s working.

 
May I know if you still need further assistance from us or it’s okay at your end now?

#5

Please login or Register to Submit Answer

Written By

Comments