If a Link Filed is not marked as required but title is marked as required, the Field rendered marks Title as Required only in Edit mode if URL data exists. Validation takes care that if URL is entered than the title is marked as required if its settings is marked as required.
But in this case, in Add mode the Title filed is not marked as required, but in Edit mode the title is marked required, which is confusing.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rahulbile’s picture

Status: Needs work » Needs review
FileSize
1.11 KB

Currently the code tries to see if the URl is not empty it marks the title as required. It does not need to check the data of URL as in edit mode someone might want to delete the data for title and Link but Required mark confuses user. Also Other validation modules which does on page validation (Eg clientside validation) do not allow to save the form until data is entered for it. Attached is initial path which tries to solve the problem.

rahulbile’s picture

rahulbile’s picture

Assigned: rahulbile » Unassigned
Chris Burge’s picture

Priority: Minor » Normal
Status: Needs review » Reviewed & tested by the community

I can confirm this bug still exists in the current recommended release of Link. This patch resolves the issue. I changed the priority to Normal because the bug does adversely affect functionality.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 2224503-2-Link-Title-required-element-required.patch, failed testing.

Chris Burge’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Category: Feature request » Bug report
Status: Needs work » Needs review
FileSize
828 bytes

Same patch as #2 rerolled against HEAD. I patched with the patch command, and it patched with fuzz. Git Apply was less forgiving.

Also, changed category to bug.. because it's a bug.

Status: Needs review » Needs work

The last submitted patch, 6: 2224503-6-Link-Title-required-element-required.patch, failed testing.

Chris Burge’s picture

Status: Needs work » Needs review

Tests buggy? I don't see how testBasic() would fail at line 87 as a result of this patch. Setting back to Needs Review.

Status: Needs review » Needs work

The last submitted patch, 6: 2224503-6-Link-Title-required-element-required.patch, failed testing.

prudloff’s picture

Here is a reroll for 1.11.