Sending registration email directly causes an error

psichma-sms

New Member
Hello,
when changing the email method for the customer registration to 'direct', the following error occurs in debugging mode:

CDbCommand::execute() failed: SQLSTATE[23000]: Integrity constraint
violation: 1452 Cannot add or update a child row: a foreign key constraint
fails (`mailwizz_send_test`.`mw_transactional_email_log`, CONSTRAINT
`fk_transactional_email_log_transactional_email1` FOREIGN KEY (`email_id`)
REFERENCES `mw_transactional_email` (`email_id`) ON DEL). The SQL statement
executed was: INSERT INTO `mw_transactional_email_log` (`message`,
`date_added`) VALUES (:yp0, NOW()). Bound with :yp0='OK'.


The email gets sent, but no customer is created because saving a log fails and a rollback happens.

I am currently working on a customer theme and some extensions, so I looked through the code and I can tell you at least that this is happening in the TransactionalEmail model.
The 'email_id' is null, so the log fails.

I even tried a fresh install without theme and extensions, but still the same error.

I am currently on version 1.6.7.

Is there some way to fix this without changing the core files directly?
 
@psichma-sms - We were made aware of this issue today and fixed it in the dev so next version will be fine.
Meanwhile, unzip attached file and put the resulted php file in apps/common/models/ folder to override the file with same name, this will fix your issue.
 

Attachments

Back
Top