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.
The Postgresql database script shipped with Drupal 4.5.2 has a 32 characters long varchar value for role name. The relevant UI form field, however, has attribute maxlength="64". This naturally causes an SQL error, if too long name is entered.
The SQL part is still same in CVS version, but I don't know if the UI part has been fixed.
Related SQL:
CREATE TABLE role (
rid SERIAL,
name varchar(32) NOT NULL default '',
PRIMARY KEY (rid),
UNIQUE (name)
);
Comment | File | Size | Author |
---|---|---|---|
#10 | role_64chars.patch | 1.54 KB | ChrisKennedy |
#8 | role.patch | 2.11 KB | kkaefer |
#5 | role.name_64.diff | 2.61 KB | Cvbge |
#2 | database_1.patch | 660 bytes | plj |
Comments
Comment #1
plj CreditAttribution: plj commentedChanging version to 4.6.1, and component to database system (perhaps more relevant than user system), as the problem still exists. It also seems that the length of the field in question is only 32 in both database.mysql and database.pgsql, even though the UI allows 64.
Either UI or the database scripts should be fixed.
Comment #2
plj CreditAttribution: plj commentedOn a second thought, here is a patch against both DBs. Both are untested, but the change is tiny.
Comment #3
Cvbge CreditAttribution: Cvbge commentedThere should be also a patch for database/updates.inc
Comment #4
plj CreditAttribution: plj commentedI've no idea how the update.inc's update numbering works. But it should excecute a statement like this:
Comment #5
Cvbge CreditAttribution: Cvbge commentedI have not tested mysql's update, but I think it should work.
Comment #6
Cvbge CreditAttribution: Cvbge commentedComment #7
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedShould be applied against head, but does not apply.
Comment #8
kkaefer CreditAttribution: kkaefer commentedAs this patch has not yet been committed, I made a new patch against head.
Comment #9
Crell CreditAttribution: Crell commentedPatch no longer applies cleanly for updates.inc. There were also some CR errors. I think it is useful and important, though.
Comment #10
ChrisKennedy CreditAttribution: ChrisKennedy commentedConfirmed that this is still an issue. Re-rolled against cvs and updated for the new .install system.
Comment #11
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #12
(not verified) CreditAttribution: commented