I upgraded to advanced forum 2 but it looks like the search is broken. When I do a search for some thing in a forum it just returns all the posts in the forum. I tried this out an a fresh drupal i hvae for testing and it is also not working there. I am usin the latest releases/alphas for advanced forum and nodecomments, i am not using dev versions. Anyone else with this problem?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Michelle’s picture

Category: bug » support

I can't reproduce this on either my dev site or my live site. I'm afraid I don't even have a guess since I don't know how the search works (merlinofchaos wrote it). Let's see if anyone else reports and issues with it.

Michelle

nathanjo’s picture

Looks fine for me. Installed in a fresh Drupal site.

greywolfsspirit’s picture

getting the same result as dimitriz1, Michelle. When I enter a string into the search box above the advanced forum module, it just returns with the same page it was on. I'm going to search to see if a return string is missing a variable or something..

greywolfsspirit’s picture

Michelle..
Just wondering.. should the last line of the array still have a comma, or is a variable missing?


// Affected templates
  $templates = array('node',
                     'comment',
                     'comment_wrapper',
                     'forums',
                     'forum_list',
                     'forum_topic_list',
                     'forum_icon',
                     'forum_submitted',
                     'forum_topic_navigation',
                     'author_pane',
                     'advanced_forum_statistics',
                     'advanced_forum_search_forum',
                     'advanced_forum_search_topic',
                     'advanced_forum_search_result',
                     'advanced_forum_topic_list_view',
                     'views_view_fields__advanced_forum_search',
                     'views_view_fields__advanced_forum_search_topic',
                     'views_view_forum_topic_list__advanced_forum_topic_list',
                     'views_view_forum_topic_list__advanced_forum_group_topic_list',
                     'views_view__advanced_forum_topic_list',
                     'views_view__advanced_forum_group_topic_list',
                     'advanced_forum_topic_legend',
                     'advanced_forum_forum_legend',
                     'advanced_forum_topic_header',
                     'advanced_forum_active_poster',    <---- should this comma be right here?
                );

Doesn't matter, that's not the culprit anyhow..

More information of what I'm experiencing: If I got into a forum, and enter anything into the search bar, it chews on it for a minute, then comes back to the Main Forum selection page again.. So, not really sure why, but it's taking the sort, but instead of displaying the results, it's re-displaying the list of forums instead. I'm trying to examine the code to see if I can come up with a cause of this.
-Jim

Michelle’s picture

Yes, the comma should be there. That's Drupal coding standards.

Beyond that, I don't know. Honestly, I don't know when I'll have time to look at this. Since I don't know how the search works, I need to learn that first, then try to troubleshoot something I can't reproduce. It may be a while unless someone else can figure it out.

Michelle

greywolfsspirit’s picture

That's understandable. I know kid-free hours are hard to come by, as well as working on many other projects at the same time. I'm content to wait to see if someone else has other suggestions on a fix.. I went through and (granted, I'm not that php/css savvy), didn't see anything out of the ordinary that would be causing this. I really wish I did know more about programming in them. I'm an old C++ programmer, so I can kinda see how the modules are set up, and deduce what each one does, but other than that.. I'm totally at a loss. (Which is why I questioned the comma, as in C++, that would have been a syntax error for undeclared variable, but I guess in php/html/css, that would default as a null?)

That's like my attempt at changing the code to show all forums and subforums like the 6.x-1 branch. I found where I need to be working with it, just haven't found the right coding to get it to do what I want yet. But, I found that's how I learn, get in, get my hands dirty, and keep trying. In no way am I expecting you to fix everything for each individual person. As you have said, it's a community, and we should all take time to try and help each other out, and not rely on waiting for you to do everything. I do understand that! And I just wanted to say, thank you, for all your time and patience with us all, and for giving as much help as you have! To me, it has been greatly appreciated.

dimitriz1’s picture

FileSize
49.32 KB
55.27 KB

I was using Windows so I decided to try a fresh install of drupal on linux incase it was some kind of windows issue. Im still getting the same problem. Here's some screenshots of the problem. The first shows my forum homepage with two forums Soccer and Golf, and I have typed in 'Tiger' into the search box.

The second image shows the result of that search. This is exactly what the problem looked like on windows too.

These are the only modules I have enabled apart from admin menu -
views-6.x.-2.11
advanced_forum 6.x-2.0-alpha3
nodecomment-6.x-2.0 -beta6
ctools 6.x-1.7
author_pane 6.x-2.0

You'll also notice that there is no textfield under the Keywords label.

Michelle’s picture

Title: Search broken? » Don't add search box and views when search not enabled
Version: 6.x-2.0-alpha3 » 6.x-2.x-dev
Category: support » task

I asked merlinofchaos to look at this and he figured it out. This problem occurs when you don't have the search module enabled. I need to put in conditional code so that it doesn't allow you to try and search when the module isn't enabled.

Michelle

greywolfsspirit’s picture

Which search module would that be, Merlin or Michelle? AFAIK, I have a search enabled in the site, but would be interested to know which search module is being referred to, so I can try adding it and see if that fixes the problem for us.

Michelle’s picture

The core search module. He turned it off and got the problem shown in #7.

Michelle

greywolfsspirit’s picture

oh ok, so that doesn't help me then.. I have the search turned on and it still does the return with the origional forum topics lists. I have the search service and the search modules activated, the location search is not turned on (as I don't have gmap installed). I'll wait until someone comes up with a solution, as I have already been over it as best as I could and can't figure it out. The main forum itself is working, and if my users need to find something that bad, they can use the main search bar and find it that way. :-)

Michelle’s picture

Category: task » bug

This really is a bug. Reclassifying.

Michelle

DamienMcKenna’s picture

Just to mention, with Michelle being busy for a little while (see note on the project page), someone else stepping up to help build a patch for this would be really beneficial to the project.

Michelle’s picture

Issue tags: +alpha 5 blocker

Yeah, this one isn't hard and doesn't take design decisions. It's just tedious to go and make sure all instances are covered and no new bugs are introduced in the process. This is one that could easily be done by someone other than me. If someone steps up in the next day or so, I'll get it in.

Michelle

mcdruid’s picture

Status: Active » Closed (fixed)
FileSize
1.66 KB

I've disabled the search box and the two search views if the core search module is not enabled - this meant adding to three places where the code was already checking for the nodecomment module.

It's possible that more checks should be added, but I think this is fairly safe in terms of introducing new bugs, because AF works without nodecomment and therefore without the search functionality.

Committed to 6.x-2.x branch.

N.B. to get search working at all for testing, I had to enable nodecomment plus core search, run cron and clear caches.

mcdruid’s picture

Status: Closed (fixed) » Fixed

oops - realised I should have been setting issues to "fixed" rather than "closed (fixed)"

Status: Fixed » Closed (fixed)
Issue tags: -alpha 5 blocker

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