Open lamasfoker opened 1 year ago
This bug causes an error on the registration page. During the installation of the plugin, in the sylius_customer
table will be added the mailchimpState
column with the value empty string
. If this customer tries to register after the installation and flags also the newsletter subscription checkbox an error will be present on the page. See the attached image.
Another solution is to put these queries in the migration files:
UPDATE sylius_order SET mailchimpState = 'pending' WHERE mailchimpState = '';
UPDATE sylius_customer SET mailchimpState = 'pending' WHERE mailchimpState = '';
This way, the previous orders and customers can conform to the plugin workflow.
I think that
\Setono\SyliusMailchimpPlugin\Model\MailchimpAwareTrait::$mailchimpState
should be nullable and defined as below:In this way, this field of the entities (order and customer) already present on the DB will be
null
. It has to benull
and not an emptystring
as is right now and I have explained the reason here.getMailchimpState()
andsetMailchimpState()
should be changed accordingly.