Closed (fixed)
Project:
Link
Version:
6.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2009 at 09:26 UTC
Updated:
19 Aug 2015 at 08:24 UTC
Jump to comment: Most recent
At the CCK Link field I enabled 'Optional URL' and filled in a 'Static Title'. When the URL is filled out everything is working fine but with an empty URL the static tile I expected to see is not showing up.
The attached patch will fix this but I have no idea what site effects this change might have. I'm also unsure if the current behavior is wanted by some users so that this patch my be optional.
| Comment | File | Size | Author |
|---|---|---|---|
| link.module.patch | 605 bytes | mutzel |
Comments
Comment #1
mutzel commentedComment #2
kdebaas commentedI can confirm that the static Title of an optional link does not show up when there is no link. I applied above patch, and the titles reappear, as plain text.
Comment #3
gg4 commentedStatic title is also missing with required URL using "seperate title and url" display option — the URL shows fine.
Comment #4
vunger commentedI have version 2.9, not 2.5, but I still had this problem, and that patch fixed it. So I'm wondering, when is the patch going to be integrated into a release? Thanks.
Comment #5
jcfiala commentedHokay - patch wouldn't work because the code went to a different place, but I've got this committed.
Comment #7
TWGerard commentedI applied mutzel's patch and it did not fix the problem for me. I also had to modify the link_field_is_empty function on line 239. Even with the other patch applied, fields were still being saved as empty and therefore not showing up on the front end. One could simply add a return false statement to this function so that no Link fields are set to empty, or add a $field['field-name'] = YOUR_FIELD_NAME clause to the if statement (which is what I did.)
I ALSO had to disable the plain text filter for title-only links in the theme_link_formatter_link_default function on line 896. Not everyone will have to do this, but it's necessary if you have markeup in your static title.
Comment #8
roopeshnaik commentedDoes anybody have patch for D7 module?