Posted by Shnapoo on September 17, 2012 at 7:55am
1 follower
| Project: | Link |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
Please see the patch below.
My use-case / intention for this patch:
Using a custom field as link title is featured by setting the link title to static and use tokens. If there is no result for these tokens (due to empty fields), token_replace() currently ignores (and spits out) the tokens.
The patch instructs token_replace() to clear tokens for which no value can be generated. So, if custom fields are empty and result to an empty link title, the Link module will again be able to use the URL as default value.
I've added the clear-flag for link title and title attribute only, because for the URL it is important the user is aware of some missing values and should see the raw tokens.
| Attachment | Size |
|---|---|
| remove-tokens-without-value.patch | 1.19 KB |