I can't get more than about 6 users in my quick switch block as there is a limit of 128 characters on the Block Quick Switch users textfield.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 440252_quick_switch_maxlength_8.patch | 1.52 KB | deviantintegral |
| #7 | 440252_quick_switch_maxlength.patch | 1.51 KB | deviantintegral |
Comments
Comment #1
deekayen commentedQuick switch settings are stored in the variables table, which has the structure of this:
The list of quick switch users is stored as a serialized array in the value field, which makes essentially no limit. Then the configuration for setting the form textfield is set as
and there is no #maxlength => 128 there, or 128 anywhere else in the file. You're going to have to clarify how where this 128 limit is.
Comment #2
mrfelton commentedwell, that was the error I got when I tried to submit the form after listing about 10 users that I wanted to include in the quick switch block. I also can't see where the limit is coming from though!
Comment #3
deekayen commentedTry again and paste the error text?
Comment #4
mrfelton commentedI'm still getting this error:
"Block Quick Switch users cannot be longer than 128 characters but is currently 135 characters long."
Perhaps there is a limit on the length of textfields imposed by Core?
Comment #5
mrfelton commentedI believe this is due to http://drupal.org/node/114774#variable-name-size
Comment #6
deekayen commentedre #5: masquerade_quick_switches isn't 128 chars long, which would be the variable's name. That's not 128 chars. I think this related to #508280: OPML remote location should accept longer URLs, where apparently FAPI defaults to 128 char limit on text fields if a maxlength isn't defined. See line ~172 of system.module.
Anyway, just set a #maxlength on the fapi element and see what happens.
Comment #7
deviantintegral commentedHere is a patch which sets #maxlength to NULL, removing the FAPI limit for both the "menu" and "block quick switch textfields. As is, they are both limited to 128 characters as mentioned in #6.
Comment #8
deviantintegral commentedHere is a rerolled patch which I will be committing in a moment.