Closed (fixed)
Project:
Link
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2010 at 11:25 UTC
Updated:
23 Feb 2013 at 22:40 UTC
The default attributes from the field settings are not transferred. There are only empty strings in the item attributes. For example, the settings for the "rel" attributes are not taken into account in the display.
| Comment | File | Size | Author |
|---|---|---|---|
| link.module.patch | 488 bytes | hkramer |
Comments
Comment #1
jcfiala commentedCan you be more specific about what this change helps/does? If you can write up a simpletest that shows the problem, that would really help.
Ie, "I create a field, and set x and y on it, and then when I create a node with this data, then it doesn't do Z".
Comment #2
mkalkbrennerWe're using this patch since more than a year and are happy with it.
Explaination for jcfiala:
The operator "+=" only adds array values if their key is not already present in the first array.
If the
$item['attributes']['rel']exists but is emtpy it won't be overridden by$field['attributes']['rel'].array_filter($item['attributes'])removes all empty values from$item['attributes']first. Now the default values from$field['attributes']will be applied.Comment #3
jcfiala commentedApplied to dev branch.