I found the previous issue regarding the advanced search page ignoring the settings for categories, user and content type so I updated. The criteria still render inaccurately. In the advanced search settings I have cats selected. On the advanced search page, the search by category section renders fine, then for search by date and user, it renders the search by cat selection AGAIN, then the date selection. The search by user is omitted as expected. The appropriate cats are omitted as per the settings. Wassup? I have the most recent version of Drupal and SQL Search. The server is running PHP5 if that helps.

CommentFileSizeAuthor
#5 advanced-search-page.patch2.35 KBrobert castelo

Comments

jo1ene’s picture

Version: 4.6.x-1.x-dev » master

I am still haveing this problem after a clean install of everything. The search by category section appears twice on the search page even if I unselect "Categories" in the advanced search settings. Once in the "Find content by category" area and once in the "Filter by date and user" area. http://bride.advancedwebdesign.com/?q=trip_search/advanced BTW, nothing is selected in the advanced search page settings. I also get this error in the Drupal logs.

Type php
Date Tuesday, August 23, 2005 - 9:09pm
User jo1ene
Location /?q=trip_search/advanced
Message Invalid argument supplied for foreach() in /home/bride/www/includes/theme.inc on line 639.
Severity error
Hostname 205.231.148.157

nedjo’s picture

Status: Active » Fixed

Issue now fixed.

Stomp Dancer’s picture

How is this fixed? I've downloaded and updated with the latest trip search and it is still doing the same thing. What else do I need to do?

Stomp Dancer’s picture

Status: Fixed » Active

I changed this to "active".

robert castelo’s picture

Status: Active » Reviewed & tested by the community
StatusFileSize
new2.35 KB

Here's a patch that fixes this issue.

Trip Search is great by the way - many thanks.

Stomp Dancer’s picture

I added this patch. The "Filter by Date and User" section still shows up on the advanced search page even when it isn't selected in the admin section.

nedjo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the patch Robert. I've tweaked it a bit before applying and I think it should be working now.

(And apologies for the previous setting to fixed--I was confusing this with a different issue.)

Stomp Dancer’s picture

Status: Fixed » Active

Now I get a fatal error when I enable this module.

nedjo’s picture

Title: Advanced Search page not redering correctly » Advanced Search page not rendering correctly

For the CVS version, you now need the latest Drupal CVS HEAD. The fatal error presumably arises from not having a current Drupal version, with its new functions.

In other words, this will be fixed for the 4.7 module release. I don't really have time to be actively patching the 4.6 branch for relatively small bug fixes (i.e., doesn't directly affect users), but would welcome anyone wanting to submit or apply a tested 4.6 patch.

Stomp Dancer’s picture

I'll give someone a dollar if they can help me out on this...please :).

joel_guesclin’s picture

Using the latest 4.6.0 download (don't want to use CVS on a live site!), there are two minor changes to the code that may help resolve the problem:

1) To prevent the vocabularies appearing twice on the page, you need to correct the variable name: it's not the same where it is set as where it is used. So in "trip_search_form", you need to change this line:

    if (module_exist('taxonomy') && variable_get('trip_search_toggle_categories', TRUE)) {

so that it reads

    if (module_exist('taxonomy') && variable_get('trip_search_toggle_category', TRUE)) {

2) Then, you need to stop the fields for the "all words" or "exact phrase" etc from appearing twice. In "trip_search_form", I changed this:

    $group = theme('table', array(), $rows);
    $form .= form_group(t('Find content'), $group);

to look like this:

    $group_types = theme('table', array(), $rows);
    $form .= form_group(t('Find content'), $group_types);

Hope this helps!

jo1ene’s picture

Status: Active » Fixed

Those edits work well for me. Thank you.

amanshakya’s picture

Status: Fixed » Active

I am using the latest Drupal version 4.6.3. I applied the patch.
But I get the following messages

Looks like a unified context diff.
Hunk #1 failed at line 384.
Hunk #2 failed at line 406.
Hunk #3 failed at line 427.
3 out of 3 hunks failed: saving rejects to trip_search.module.rej

I also changed the lines of code as mentioned, after that. But I still have the same problem. I wonder why. I would be highly thankful if someone could help.

jo1ene’s picture

Status: Active » Fixed

This is a problem with patch application, not with the module or patch code. There are only two edits, which are listed in message #11. Try copying and pasting them manually.

Anonymous’s picture

Status: Fixed » Closed (fixed)
ljet’s picture

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

I still need to use version 4.6 although it was fixed in version 4.7.
I want to see "Filter by date and user" option in advanced search form.
Where can i fix it?
I would be very thankful if anyone of you could give me helping hand.
Thanks in advance.