-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2465 from ec-europa/nept-2392
NEPT-2392: Port link patch to 2.4
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
resources/patches/nept-2251-link-SA-CONTRIB-2019-020.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- link.module 2019-02-20 21:18:42.621974792 +0000 | ||
+++ link.module 2019-02-20 21:19:16.553471657 +0000 | ||
@@ -276,6 +276,15 @@ | ||
_link_validate($items[$delta], $delta, $field, $entity, $instance, $langcode, $optional_field_found, $errors); | ||
} | ||
} | ||
+ foreach ($items as $delta => $value) { | ||
+ if (isset($value['attributes']) && is_string($value['attributes'])) { | ||
+ $errors[$field['field_name']][$langcode][$delta][] = array( | ||
+ 'error' => 'link_required', | ||
+ 'message' => t('String values are not acceptable for attributes.'), | ||
+ 'error_element' => array('url' => TRUE, 'title' => FALSE), | ||
+ ); | ||
+ } | ||
+ } | ||
|
||
if ($instance['settings']['url'] === 'optional' && $instance['settings']['title'] === 'optional' && $instance['required'] && !$optional_field_found) { | ||
$errors[$field['field_name']][$langcode][0][] = array( |