Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
locale_schema() is varchar(12) so Language code textfield should be the same
Comment | File | Size | Author |
---|---|---|---|
#9 | 1260752-language_controls.patch | 585 bytes | andypost |
#9 | locale_no_patch.png | 31.07 KB | andypost |
#9 | locale_patch.png | 31.28 KB | andypost |
#5 | 1260752-language_controls.patch | 603 bytes | andypost |
#2 | 1260752-language_controls.patch | 577 bytes | andypost |
Comments
Comment #1
Gábor Hojtsy1. The database does indeed has a maxlength of 12, so having 60 here is just misleading people. It is going to be truncating the string anyway. So this is a very straightforward and clearly good change.
2. Making the field itself 3 chars longer @andypost explained to me in person that is about making sure that the value is visible even if the font is wider. Which might be workaround for possible browser bugs I think.... I'd assume the field is sized for the wider char to be sure it would fit the data, but this is a browser thing...
Comment #2
andypostI think this was a mistake - size and maxlength should be swapped because all fields on this form has default width (60 from formapi)
Comment #3
Gábor HojtsyThis looks very straightforward and simple then as per my #1 comment above.
Comment #5
andypostRe-roll for current d8
Comment #6
andypostback to rtbc
Comment #7
Gábor HojtsyLooks good to me, should be ok to commit.
Comment #8
catchThanks! Committed/pushed to 8.x. Will need a re-roll for 7.x.
Comment #9
andypostre-roll for D7
UI before patch
After patch
Comment #10
andypostThis is a direct backport but brings a bit of UI change so still needs review...
Comment #11
Gábor HojtsyLooks good, matches form setup to schema so longer language codes are not possible to input.
Comment #12
Gábor HojtsyTagging with language base.
Comment #13
webchickIt's a little odd to resize the textbox visually at the same time we make its max length different, but this seems like a harmless enough change.
Committed and pushed to 7.x. Thanks!