By policy, no default_value can be set for forms API password fields. For this module that's rather annoying. It would be better to present the password as a series of * so that users don't need to enter the password each time they wish to change some other field.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1884312-3--password_default.patch | 1.27 KB | drunken monkey |
| #2 | search_api_solr-default-password-1884312-2.patch | 540 bytes | mvc |
| #1 | search_api_solr-default-password-1884312-1.patch | 505 bytes | mvc |
Comments
Comment #1
mvcComment #2
mvcupdated patch for rc5 (new location for service.inc)
Comment #3
drunken monkeyAh, thanks a lot for reporting this! I can see how this would be annoying if you have a password-protected Solr server, yes …
However, I don't know about your patch's approach, I think there's a good reason you cannot set a default value for password fields. I can't recall seeing this anywhere else on the web, and I'd also not be sure that all browsers even allow it.
How about we just ignore the value if it's empty and the HTTP user wasn't changed? Patch attached, please test!
Comment #4
mvcit's valid XHTML from what i know, but i agree it doesn't really make sense and probably shouldn't even be possible. your approach is much better! the patch works perfectly for me; i tried saving the page with the username intact and with it removed and it behaved as expected. one small comment: i would suggest adding a #description to the password field explaining all this. for example: "If this field is left blank and the HTTP username is filled out, the current password will not be changed."
Comment #5
drunken monkeyThanks for the suggestion!
Added that and committed.
Comment #6
drunken monkey