Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
link_field_item_property_info() defines sub-properties for link fields, and the 'url' property's type is defined as 'url':
$properties['url'] = array(
'type' => 'url',
'label' => t('The URL of the link.'),
'setter callback' => 'entity_property_verbatim_set',
);
However, the 'url' type is validated by Entity API with valid_url(). Link module allowed Drupal paths to be entered into the field, eg 'node/1', but this type prevents a path being set programmatically in the field value because it doens't validate as a url.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2558497.link_.url-property-type.patch | 417 bytes | joachim |
Comments
Comment #2
joachim CreditAttribution: joachim commentedComment #3
renatogMake sense.
Thank you very much @joachim
Comment #5
renatogFixed.
Commited in dev branch.
Good Work.
Regards.