Closed (fixed)
Project:
Link
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2012 at 16:41 UTC
Updated:
16 Jan 2013 at 09:00 UTC
Jump to comment: Most recent file
Hi,
if I enter a not valid URL the form_set_error is executed but with a wrong field name:
File: link.module, function: _link_validate, Line: 361
form_set_error($field['field_name'] .']['. $delta .'][url', t('Not a valid URL.'));
But it should be:
form_set_error($field['field_name'] .'][und]['. $delta .'][url', t('Not a valid URL.'));
Or whatever language is used.
I am pretty sure this same applies to some other fields in the same function since share the same pattern, but I have not checked so far.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | link-1541010-missing_langcode-5.patch | 2.88 KB | boobaa |
Comments
Comment #1
andrew_mallis commented++
Comment #2
andrew_mallis commentedseems like this is fixed on -dev.
Will we see a release soon? Seems like it should be time now.
Comment #3
jcfiala commentedI'm trying to go through various tickets for 7 and grab a bunch of the low-hanging fruit so we can get a 7.x-1.1 release out sometime this month, although when I say 'sometime this month' I probably mean 'at the end of this month'.
Comment #5
boobaaHere's a patch against 7.x-1.0 for those poor souls who are stuck with it like me.
However, it'd be much better for UX if the error message would contain the field name as well; think about a user (profile) form with several different link.module fields for Facebook/Twitter/LinkedIn/whatever – but that should be a different issue, I think.
Comment #6
boobaaFor the record: there goes the above-mentioned field name vs. error message issue: #1889918: URL validation error message should contain the field name