Skip to content

field lengths differ across many tables #10869

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

Closed
steros opened this issue Sep 13, 2017 · 10 comments
Closed

field lengths differ across many tables #10869

steros opened this issue Sep 13, 2017 · 10 comments
Assignees
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@steros
Copy link
Contributor

steros commented Sep 13, 2017

Preconditions

  1. any Magento 2 version
  2. have no telephone validation except than it's required

Steps to reproduce

  1. place an order
  2. enter a very wide telephone number (+20 characters)
  3. order

Expected result

  1. the very long telephone number should appear in the database as the field is 255 characters long in sales_order_address

Actual result

  1. the telephone number gets cut off after 20 characters as the quote_order_address field is just set to 20 characters VARCHAR

Fix

See #10868
Raise the characters in quote_order_address to 255 VARCHAR as in sales_order_address

Further comment

I found numerous field lengths to be different across many tables. Thus strings get cut off.
In my case the "telephone" was cut off as someone set it to be just 20 characters in the quote_address table despite it being 255 characters wide in the sales_order_address table.
There are many other fields differing.

Someone seriously needs to check this! Unfortunately I do not have enough knowledge about all the fields.

In my case our customers want to enter not one phone number but sometimes their landline and mobile phone number into the telephone field. The field is not validated against any format.

It seems this is across any version.

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Sep 13, 2017
@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 13, 2017
@southerncomputer
Copy link
Contributor

Well you should have consistent field sizes - so reducing a 255 -> 20 is a no-go for backwards compatibility, why not propose a patch to fix what you've seen! I've had to manually address this as our ERP uses sql-server which is very unkind and does the right thing -faults the insert on size/truncation where-as mysql does the unthinkable and loses data quite happily!

@steros
Copy link
Contributor Author

steros commented Sep 18, 2017

Hey,

I've already proposed a patch and there discussion has gone a bit further.
It seems this is actually a bug which needs to be addressed.

So I'm closing this.

@steros steros closed this as completed Sep 18, 2017
@orlangur
Copy link
Contributor

Here is what needs to be done: #10868 (comment)

Similar issue existed for multiple fields, first/middle/lastname were fixed before but telephone (AND MAYBE other fields, this needs to be checked) are still affected.

@orlangur orlangur reopened this Sep 28, 2017
@magento-engcom-team
Copy link
Contributor

@steros, thank you for your report.
We've created internal ticket(s) MAGETWO-80421 to track progress on the issue.

@magento-engcom-team magento-engcom-team added 2.1.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Sep 29, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Oct 1, 2017
@rogyar
Copy link
Contributor

rogyar commented Oct 7, 2017

I've addressed the issue in my PR (#11286). Checked the issued fields and found that it makes sense to extend the following fields:

  • telephone. Has been already discussed.
  • fax. Same issue as with telephone
  • region
  • city

As for the region and city, there are some really long names (https://en.wikipedia.org/wiki/List_of_long_place_names). So, it doesn't make sense to limit the length up to 50 or so.
According to this issue, there's no some reasonable limit for the telephone number length (however, it should not exceed 15-20 characters ideally).
Thanks.

@maksek
Copy link
Contributor

maksek commented Oct 15, 2017

Hey @rogyar, should I assign the ticket on you?

@rogyar
Copy link
Contributor

rogyar commented Oct 18, 2017

Hello @maksek. Sure, thank you.

@steros
Copy link
Contributor Author

steros commented Nov 6, 2017

Thanks guys for working on this 👍

@okorshenko okorshenko added ready for backport Fixed in 2.3.x The issue has been fixed in 2.3 release line labels Nov 28, 2017
@dverkade
Copy link
Member

dverkade commented Jan 6, 2018

I backported this issue to 2.2-develop branch and submitted a PR. This issue is still open for 2.1. In 2.1 the module database version is at 2.0.4. These changes are in version 2.0.7. Should the database changes in 2.0.5 and 2.0.6 be backported first in order to backport this issue to the 2.1-develop branch?

@magento-team
Copy link
Contributor

Hi @steros. Thank you for your report.
The issue has been fixed in #13015 by @dverkade in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

@magento-team magento-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jan 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

9 participants