The database field size for term names is 255. Patch attached.

Thanks
-K

CommentFileSizeAuthor
taxonomy.module_14_0.patch2.1 KBZen

Comments

morbus iff’s picture

-1. We keep going back and forth on this. We've got one group of people (webchick is part of 'em, I think) that keeps creating patches to standardize all the form inputs to the same number (64 or similar) and then another group of people who goes around and standardizes them back to database column length. That neverending cycle just isn't working anymore, and more substantial research needs to be done on the right, and final, approach.

killes@www.drop.org’s picture

Shouldn't the length of database fields and input text fields now be the same even for multibyte languages after we switched to uft-8 for the database? What is mysql's notion of a character wrt uft-8?

Zen’s picture

Morbus: I don't have anything against standardising maxlength fields as long as the corresponding database fields are also fixed.. else the patches are wrong and should not be accepted. So I don't see why this should be -1'd..

Related issue: Here, (amongst other things) usernames are set max lengths of 64 whereas the database field lengths is only 60.

Consistency, Consistency, Consistency ... that's all I'm after.
-K

morbus iff’s picture

Listen closely to what killes asked: it appears, and this is certainly news to me, that part of the reason for the disparity was that databases stored multibyte languages as MORE than one character - so a five letter username in a five length field would work, but not if one of those letters were multibyte (six characters in a five length field). Anyways, the 64 *is* attempting to be consistency - that was the whole goal of that previous patch (whom I've yet to find) - to standardize all the maxlength's of all FAPI textfields to one length, being 64.

Personally, I do agree that maxlength's should be set to the length of the database column, but I've just seem these patches go in, get undone, and then get re-patched again, so many times that I'd rather have some demonstrably "look, this is why we do, and don't you dare change it". And for that, I need a bit more "concrete" proof than just "standardization". If someone could investigate killes' comment, we'd be able to say "In the past, the disparity was due to multibyte languages. Nowadays, however, we match column length to maxlength in every circumstance." Until that happens, we're just going in circles.

Zen’s picture

Fair enough, if there is a reason for it. I personally have no idea about multibyte storage. But as is evident from the linked issue in my last post, this was definitely not the intent of the existing (maxlength = 64) system - then all username fields would have to be restricted to a value lesser than 60 (the database field length for usernames), and not 64.

Please feel free to review the other patch as well :)

Thanks
-K

morbus iff’s picture

I'll be refraining from comment on your other patch - while I agree it's needed, I don't agree it's needed RIGHT NOW. I'd much rather have proper research done and have *all textfields and all column lengths* reconsidered in one central issue/patch. Until then, we're just gonna have all these minor patches, like yours, getting in, and then suddenly they'll be patches like "Username doesn't respect 64 maxlength standardization". The same ol', same ol', all over again. This is the circle.

Zen’s picture

Point taken and done..

Thanks
-K

Zen’s picture

Status: Needs review » Postponed
lilou’s picture

Version: x.y.z » 7.x-dev
Status: Postponed » Fixed

Fixed in CVS/HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.