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.

CommentFileSizeAuthor
#5 link-1541010-missing_langcode-5.patch2.88 KBboobaa

Comments

andrew_mallis’s picture

++

andrew_mallis’s picture

Status: Active » Fixed

seems like this is fixed on -dev.

Will we see a release soon? Seems like it should be time now.

jcfiala’s picture

I'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'.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

boobaa’s picture

StatusFileSize
new2.88 KB

Here'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.

boobaa’s picture

For the record: there goes the above-mentioned field name vs. error message issue: #1889918: URL validation error message should contain the field name