Hi!

I have been struggling with this problem for a couple of days. I have an advertisment content type. It has two cck fields: category and city. These are taxonomy list. I created a finder for this options with AND relation. When I start using my finder i got no result. If i create a finder with only one finder element (which is also a taxonomy) i got result. What could be the problem?

Comments

batka78’s picture

StatusFileSize
new4.46 KB

I attached my exported finder. Please help.

batka78’s picture

Up!

danielb’s picture

oh crap not this taxonomy issue again, I thought I fixed it
*sigh* I'll look into it when I can, not an easy one to get your head around
Basically I think the database results get split into two rows, one row representing the match for the first element, the other row representing the match for the second element - but neither row matches 'both' conditions, so neither is returned.

But I'll have to do some serious debugging to confirm this and work out what to do.
Don't have time for it right now, but I have next week off work so hopefully I'll get around to it then.

batka78’s picture

Thank you in advance for your help.
Please let me know if it's okay.

James-TRMS’s picture

Hi

I am also experiencing this issue and would very much value a solution as the search functionality is essential to the UX on my site - no taxonomy AND relation, no site!

Thank you very much in advance

danielb’s picture

One thing I notice is that your post mentions you are using a CCK field for taxonomy. However the export you attached shows that your finder does NOT use a CCK field.

I have tested a finder with two elements, each with one field for a different CCK content taxonomy, and with AND conjunctions works just fine.

danielb’s picture

Version: 6.x-1.14 » 6.x-1.x-dev

Of course I am using 6.x-1.x-dev. You should always report bugs against the latest code.

I do notice that the default taxonomy options (without using a content taxonomy field) suck a bit, since the 'terms for xxx' field was removed. Might put that back in for drupal 6.

danielb’s picture

I tracked down the problem with the taxonomy fields to a line of code that was removed because of this issue: #1248608: Search For Values In Range
So I have to find a solution that works for both these issues.

danielb’s picture

Status: Active » Fixed
StatusFileSize
new5.25 KB

I've made a few changes regarding this. I'm going to leave a patch here in case this needs to be revisited or some of this could be useful in D7.
These changes will appear in the next dev snapshot.

batka78’s picture

StatusFileSize
new4.7 KB

Hi!

Thank you for your efforts.
Your patch works, but there are several warnings after searching. If the search run again with the same searcing params, the warnings disappear. On the other hand the autocomplete function not works, but it was okay before the patch was installed. What shall I do?

danielb’s picture

Status: Fixed » Needs work

I'll look into it.

batka78’s picture

I've changed 'field' to 'filter' in line 281 of 'finder\modules\finder_views\finder_views.module' file. See:
" $options = views_fetch_fields(array_keys($base_tables), 'filter');"
With this little change the autocomplete function works.

danielb’s picture

It's already 'filter'. Did you mean the other way around?

batka78’s picture

'filter' is the good solution.

batka78’s picture

Status: Needs work » Closed (fixed)

Thanks for your help!
I close this ticket.

danielb’s picture

Component: Finder Optionwidgets » Code
Status: Closed (fixed) » Fixed

yep great, you made the issue disappear for 5 weeks, thanks for that

There's some issues about the code

                // This line below actually seems to break stuff. Issue #1248608.
                 $join->left_table = $join_alias;
danielb’s picture

Status: Fixed » Active
danielb’s picture

Status: Active » Closed (fixed)