4

I changed shipping street address values 2 in the admin panel. Now I can't place order only for logged in users. It's working fine for not logged in user.

If I changed it into 3 lines of the street it's working fine.But not working for 2 lines.

for more details : https://github.com/magento/magento2/issues/13766

Kindly help me.

advance thanks

4 Answers 4

3

This query will change from 3 lines to 2 lines. It will change the first 'new line' to ', '.

to view,

SELECT insert(street, locate('\n', street), length('\n'), ', ') from customer_address_entity where length(street) - length(replace(street, '\n', ''))>1;

To update

update customer_address_entity set street= insert(street, locate('\n', street), length('\n'), ', ') where length(street) - length(replace(street, '\n', ''))>1;
1

Better option is to convert 3 line street data to single line then update the config.

Hope this below query helps

To check

select entity_id, street, replace(street,'\n',',') as street_new from customer_address_entity;

To update

update customer_address_entity set street = replace(street,'\n',',');
1

All the previous answers are correct, but, to get and update only the customers/addresses which generates issues I suggest you to include a WHERE statement.

Get affected customers/adddresses:

SELECT 
    entity_id, parent_id, street, replace(street,'\n',',') as street_new 
FROM 
    customer_address_entity 
WHERE 
    street LIKE '%\n%'
ORDER BY 
    parent_id DESC;

Fix them massively:

update customer_address_entity set street = REPLACE(street,'\n',',') WHERE street LIKE '%\n%'

Doing this, you will put the address in a single line changing the line breaks by commas.

0

If an existing customer has 3 street address line when our customer configuration street line number 3, then we change the configuration and those customers getting this error. To delete the existing street address and add a new address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.