Phone, Fax character lengths

2 views
Skip to first unread message

Ilya Bernshteyn

unread,
Oct 21, 2010, 1:11:45 PM10/21/10
to in-por...@googlegroups.com
FYI we noticed that the character length for the Users -> Phone field is 20 characters, while it's 255 for Fax.

255 makes more sense because, for example, 555-555-5555 ext. 555 phone number doesn't fit.

Ilya

Phil -- wbtc.fr --

unread,
Oct 21, 2010, 2:26:57 PM10/21/10
to in-por...@googlegroups.com
Ilya,

thanks for you report. The lenght of all form fields can be freely setup in each theme page, but it make senses to use the field for other informations than just numbers.

Guys, do we add a small patch to Default theme?

Phil.

2010/10/21 Ilya Bernshteyn <ily...@gmail.com>

Alexander Obuhovich

unread,
Oct 21, 2010, 3:32:24 PM10/21/10
to in-por...@googlegroups.com
Ilja wasn't talking about theme at all. He was talking about database field length, that is preventing longer phone numbers to be properly saved.
--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Phil -- wbtc.fr --

unread,
Oct 21, 2010, 4:10:14 PM10/21/10
to in-por...@googlegroups.com
hehe ok, anyway this small patch could be usefull.

btw I add the same problem with others fields in DB which I needed to make longer, but didn't thought about reporting here :S (mainly about custom fields max lenght)

2010/10/21 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Oct 21, 2010, 4:26:42 PM10/21/10
to in-por...@googlegroups.com
custom fields are not limited in length, since they all are of "text" type, which is 65 KB of text.

Dmitry A.

unread,
Oct 22, 2010, 12:25:16 AM10/22/10
to In-Portal Development Team
Thanks for reporting Ilya!

Guys, I think we need to review Fields in the whole PortalUser table
to make sure they have correct definitions.

Besides Phone limitation we have Fax as NOT NULL when it can be NULL
by default, and there are other fields which have to be checked and
updated in that table.

I guess we can create a task for this?


DA

On Oct 21, 3:26 pm, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> custom fields are not limited in length, since they all are of "text" type,
> which is 65 KB of text.
>
> On Thu, Oct 21, 2010 at 11:10 PM, Phil -- wbtc.fr -- <p...@wbtc.fr> wrote:
>
>
>
>
>
> > hehe ok, anyway this small patch could be usefull.
>
> > btw I add the same problem with others fields in DB which I needed to make
> > longer, but didn't thought about reporting here :S (mainly about custom
> > fields max lenght)
>
> > 2010/10/21 Alexander Obuhovich <aik.b...@gmail.com>
>
> > Ilja wasn't talking about theme at all. He was talking about database field
> >> length, that is preventing longer phone numbers to be properly saved.
>

Alexander Obuhovich

unread,
Oct 22, 2010, 2:57:27 AM10/22/10
to in-por...@googlegroups.com
yes

Phil -- wbtc.fr --

unread,
Oct 22, 2010, 4:03:29 AM10/22/10
to in-por...@googlegroups.com
that's right, this problem was in v4.x, my mistake :$

2010/10/21 Alexander Obuhovich <aik....@gmail.com>

Alexander Obuhovich

unread,
Oct 25, 2010, 4:32:26 PM10/25/10
to in-por...@googlegroups.com
After inspection of PortalUser table I've got this:
  • Phone, City - 20 symbols - needs increase;
  • State - 20 symbols - do nothing, since state is 2/3 iso code any way;
  • Zip - 20 symbols - do nothing, since it's 9 symbols for US, 7 for LV;
  • Country - 20 symbols - do nothing, since it's 3 symbol ISO code there;
So it seems, that only Phone field needs to be enlarged.

Dmitry A.

unread,
Oct 28, 2010, 12:32:33 PM10/28/10
to In-Portal Development Team
You wanted to say Phone and City?

Are we ready for a task here?

DA

On Oct 25, 3:32 pm, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> After inspection of PortalUser table I've got this:
>
>    - Phone, City - 20 symbols - needs increase;
>    - State - 20 symbols - do nothing, since state is 2/3 iso code any way;
>    - Zip - 20 symbols - do nothing, since it's 9 symbols for US, 7 for LV;
>    - Country - 20 symbols - do nothing, since it's 3 symbol ISO code there;
>
> So it seems, that only Phone field needs to be enlarged.
>
> On Fri, Oct 22, 2010 at 11:03 AM, Phil -- wbtc.fr -- <p...@wbtc.fr> wrote:
>
>
>
>
>
> > that's right, this problem was in v4.x, my mistake :$
>
> > 2010/10/21 Alexander Obuhovich <aik.b...@gmail.com>
>
> >> custom fields are not limited in length, since they all are of "text"
> >> type, which is 65 KB of text.
>
> >> On Thu, Oct 21, 2010 at 11:10 PM, Phil -- wbtc.fr -- <p...@wbtc.fr>wrote:
>
> >>> hehe ok, anyway this small patch could be usefull.
>
> >>> btw I add the same problem with others fields in DB which I needed to
> >>> make longer, but didn't thought about reporting here :S (mainly about custom
> >>> fields max lenght)
>
> >>> 2010/10/21 Alexander Obuhovich <aik.b...@gmail.com>
>
> >>> Ilja wasn't talking about theme at all. He was talking about database
> >>>> field length, that is preventing longer phone numbers to be properly saved.
>

Alexander Obuhovich

unread,
Oct 28, 2010, 12:34:27 PM10/28/10
to in-por...@googlegroups.com
Yes, of course.

Dmitry A.

unread,
Oct 29, 2010, 12:23:09 PM10/29/10
to In-Portal Development Team
Task has been filed:

909: Increase length of Phone and City DB fields for User prefix

http://tracker.in-portal.org/view.php?id=909

DA

Dmitry A.

unread,
Oct 29, 2010, 1:26:32 PM10/29/10
to In-Portal Development Team
Alex,

By the way, is there a reason why we have Street2, Fax fields as NOT
NULL while Street and Phone are NULL by default?

'Phone' => Array('type' => 'string','default' => null),
'Fax' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
'Street' => Array('type' => 'string', 'default' => null),
'Street2' => Array('type' => 'string', 'not_null' => '1', 'default' =>
''),
'City' => Array('type' => 'string','default' => null),

How about we make it consistent if there is NO special need for this?


DA

Alexander Obuhovich

unread,
Oct 29, 2010, 1:29:18 PM10/29/10
to in-por...@googlegroups.com
That's another incorrect usage of NULL fields. Back in 2003 year most of In-Portal fields were NULL and till now we are finding new occurrences of incorrect field usage and fixing them.

Dmitry Andrejev

unread,
Oct 29, 2010, 1:35:07 PM10/29/10
to in-por...@googlegroups.com
Okay, I'll be updating this in current Portal User table for all fields since it's going to save us additional changes in Upgrades.sql plus can be done quickly.

Please correct me if I am wrong - all SHORT Strings (255) should be NOT NULL?

DA.
--


Best regards,

Dmitry A.

Alexander Obuhovich

unread,
Oct 29, 2010, 1:38:57 PM10/29/10
to in-por...@googlegroups.com
Yes.

When NULL value has special meaning and it's not the same as empty string for code using it, then NOT NULL should be used.

Dmitry Andrejev

unread,
Oct 29, 2010, 2:30:56 PM10/29/10
to in-por...@googlegroups.com
Task name has been changed to:

909: Corrections in PortalUser table fields.

Patch attached, please test


DA
Corrections-in-PortalUser-table-fields.patch
Reply all
Reply to author
Forward
0 new messages