Closed (fixed)
Project:
Link
Version:
5.x-2.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2008 at 16:11 UTC
Updated:
3 Oct 2011 at 22:01 UTC
Jump to comment: Most recent file
Hi,
I'm trying to create a View with an exposed filter where users can enter a search term to match the title part of a CCK Link field. My problem is that entering a term such as "times" should match nodes where the title of the Link field is "New York Times" but instead the results are not filtered, they still contain all the results.
Is this functionality possible? Is there something I'm missing?
Thanks,
Alex
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | link25patched.png | 20.09 KB | el_reverend |
| #1 | link-290978-1.patch | 919 bytes | akahn |
Comments
Comment #1
akahn commentedI did a bit of (shallow) digging and uncovered what I think is a mistake in
link_field_settings(), undercase 'filters':. The handler for both the URL and Title exposed filters is set toviews_handler_operator_like, whereas it should useviews_handler_filter_like.Changing both of these handlers to
views_handler_filter_likemade my Views exposed filters for URL and Title work correctly.Attached is the patch, rolled against DRUPAL-5--2.
Comment #2
akahn commentedUpon further testing, it appears that the above patch doesn't fix the problem. Whether the exposed filter is Link: Title or Link: URL, only searching for strings in the URL works. Thus, 'times' will return news stories from the New York Times and the LA Times because 'times' is in the URL, but 'New York' will not return New York Times. 'nytimes' on the other hand, will return these nodes since nytimes is in the URL.
I can't quite tell what's going on, but my guess is there may need to be a separate function for
link_views_title_filter_handler(), or at least some way to make the exposed filter look in the Title part of the Link field when using a Link: Title filter, and not look at the URL at all.Any help or direction on this would be appreciated. I'm getting fairly lost in trying to understand how the Views integration works.
Comment #3
junro commentedHi, I have the same problem, I want to use a view filter with a Link CCK Field but it's not working? If I use a text field, it's working, but I don't have the link. How to put a link in a text field without using CCK Link Field?
Comment #4
el_reverend commentedI am having the same issue. I am using the link module in a content type and have created a view that lists the link in a table. I have the link-title exposed to the user but it won't work.
I have applied the patch listed above on Link 2.5 and 2.3.1 but it won't work consistently. I have tried it and it worked once, but not again.
In the attached image below the last item should not appear when I search for 'video' in the resource name section.
Does anyone have any ideas?
Comment #5
el_reverend commentedI have checked and it seems that using the Link - Title also requires the URL to contain the same string in the link in order for the filter to work. I used the token replacement to automatically add the title to the link URL, but when I manually entered the link (including the same string as the link title - it worked. Changing the link title to a different string breaks the filter again.
Interesting? Ideas?
Comment #6
matytsio commentedI am trying to implement a view filter for "Link:Title Contains string", and it doesn't work at all, no matter if it is exposed or not. Neither does Link:URL filter. The generated query does not have any mention of this filter at all.
Is this still an active issue or should have been fixed??
Link:Protocol filter is the only one that works for me... Using Drupal 5.18, Views 5.x-1.x-dev, Link 5.x-2.5.
What additional info may be of help?
Thanks.
Comment #7
dqdbrowser refresh issue ... (double post deleted)
Comment #8
dqdplease read Drupal guides for marking an issue as critical.
Regarding concentration on Drupal 7 stable release and still working on Drupal 6 issues and feature support, we stop Drupal 5 support from now on anyway. Sorry. The files will stay online for any case of use or modification but issues will be closed next days.
thx for understanding