-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Magento_Sales module fails to upgrade (email has a wrong format) #14964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It was related to null entry email in sales_order_address.
|
But why do we have this issue while upgrading to 2.2.4. |
I was affected by this issue too. Solution from gtlt resolved this issue. But I also agree with @webspeaks, setting a dummy email address should not be the correct solution. |
I am also affected by this issue: Module 'Magento_Sales': Updating sales_order_address and quote_address with a fake email has not worked for me. Anyone else have another solution to get passed this? Other tables that might need to be checked/email faked as well? |
Any update on that i am facing same issue Module 'Magento_Sales': Thanks, |
@kabadabra have you find any solution ?? |
I was affected by this issue too. Solution from gtlt resolved this issue. But I also agree that setting a dummy email address should not be the correct solution. |
Based on gtlt solution, still not perfect but this query works too: |
@gtlt solution worked for me too. Just make sure you |
After I fix the emails I get this error- Missing required argument $options of Magento\Eav\Model\Entity\Attribute\Source\Config. https://imgur.com/a/SqhERi1 It happens on the exact same step. Anyone else getting this? |
@kamranmalikawan
After the above, everything upgraded and deployed smoothly. In short, just make sure all the data in the email column are valid email addresses. Hope this helps! |
For missing email addresses, I've combined two approaches above to use the order email address where available and otherwise use a dummy address:
|
Same issue: |
@kamranmalikawan; any solution works for me. Any more solution ?? |
Hi @gtlt I cannot reproduce your scenario, see attachments |
@engcom-backlog-nazar I also spot that scenario. In database migrated from M1 we had:
Also, we had many invalid entries in these fields eg.:
I think this issue may be related to issue described in magefan/module-blog#169 In general, upgrade script uses very expensive logic to update one field in the order address records instead of just running one MySQL query. It fetches all addresses from the database, the loops trough them - loading order and quote objects for each and then saving the address. The side effect of this is that it runs order and quote address validations, what causes issue reported above. |
@wojtekn , problems with data migration from 1.x must be reported in https://github.com/magento/data-migration-tool repository. |
@wojtekn -> magefan/module-blog#169 -> Please follow these guidelines for proper tracking of your issue. You can report Commerce-related issues in one of two ways: GitHub is intended for Magento Open Source users to report on issues related to Open Source only. There are no account management services associated with GitHub. |
@engcom-backlog-nazar what I said above is not really data migration problem, it's Magento 2 setup upgrade problem. Please review referenced issue. Also, I'm not a bug reporter here, I just wanted to help as I felt you are trying to close the ticket with "we cannot reproduce" status. |
@wojtekn In described scenario i have no error ,i try many times but have no errors |
It appears to happen to people who have migrated from Magento 1. If you open it up as a ticket on the data migration tool repository he will say everything migrated correctly and it is a problem with the upgrade script. |
@niners52 👍 😄 |
@niners52 seems like problem not in upgrade script, when you run upgrade script, its already have email is null, in my case when i upgrade magento to 2.2.4 i have no email is null. so have no error |
Did you migrate a full Magento 1 database before you did that? I have opened several tickets on the data migration tool and the responses are never speedy, but if you want me to write this up and put it on the repository I can. The other option is that maybe you reach out to Victor since you work for the same company. |
@niners52 No -> |
That is great for you guys, but we don't live in a world with empty databases. The people on this thread have data. I had a ticket in with the Magento support that has my db if you want to talk to them. |
@niners52 I have installed sample data with 45 customer and others data e.g 'orders,products' |
I am sure your sample data wasn't migrated though. For me I have been working on my m2 site for about 6 months. I had 2.2.2 and migrated to 2.2.3 with no problems. It was the migration from 2.2.3 to 2.2.4 that this error happened. Look at what was changed in 2.2.4. There had to have been something that looks at addresses. Once you isolate that talk to Victor and see if he has any idea on why migrated data only would cause that error. |
@gtlt Can you provide more information ? |
I would recommend using this query instead of dummy or wrong email addresses to keep the sales data accurate. I just resolved the issue on mine right now
@gtlt @maderlock @kabadabra @hanego @niners52 now this issue is most probably because the shipping address rows do not require an email address in the email column and only billing address row does and to replicate the issue you have to place orders in 2.2.2 and then try to upgrade |
@magento-engcom-team @engcom-backlog-nazar @gtlt In
method It's So why is Magento team please clarify. |
@engcom-backlog-nazar I don't have much more info, the last null entry creation date I spotted is in february 2017, so from an order made under M2 2.1.x (I migrated my data from M1 in late 2016 to ~2.1.3 I think).
|
Hi @gtlt HI @rparsi I'm tested with-> update sales_order_address set email=null parent_id=null address_id=null; update quote_address set email=null Then run setup upgrade-> debug point on
I'm not have an error, filed not updated if i only delete the adress_id, |
@gtlt I used the update query to update rows with multiple the same issues
|
Can happens on updates to 2.2.6, too. |
Preconditions
Steps to reproduce
Expected result
Actual result
Module 'Magento_Sales':
Upgrading data.. We can't save the address:
Email has a wrong format
In which table should I fix emails ? I have email Null values with the following request
The text was updated successfully, but these errors were encountered: