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

CommentFileSizeAuthor
#4 link25patched.png20.09 KBel_reverend
#1 link-290978-2.patch919 bytesakahn
#1 link-290978-1.patch919 bytesakahn

Comments

akahn’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new919 bytes
new919 bytes

I did a bit of (shallow) digging and uncovered what I think is a mistake in link_field_settings(), under case 'filters':. The handler for both the URL and Title exposed filters is set to views_handler_operator_like, whereas it should use views_handler_filter_like.

Changing both of these handlers to views_handler_filter_like made my Views exposed filters for URL and Title work correctly.

Attached is the patch, rolled against DRUPAL-5--2.

akahn’s picture

Title: Link field with Views exposed filters » Views exposed filters for Link title and URL do not filter results
Status: Needs review » Needs work

Upon 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.

junro’s picture

Hi, 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?

el_reverend’s picture

Priority: Normal » Critical
Status: Needs work » Postponed (maintainer needs more info)
StatusFileSize
new20.09 KB

I 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?

el_reverend’s picture

I 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?

matytsio’s picture

Version: 5.x-2.3.1 » 5.x-2.5

I 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.

dqd’s picture

Priority: Normal » Critical
Status: Fixed » Postponed (maintainer needs more info)

browser refresh issue ... (double post deleted)

dqd’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Fixed

please 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

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.