My search "yielded no results"

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Branjawn's picture

In the past few days I've upgraded from 6.16 to 6.17 and installed CiviCRM.

Since I didn't use the search function during that span, nor in a while, I don't know why or when it broke.

So, it's a church website, I searched my name, "church", "foc", "bible", all came back with: You must include at least one positive keyword with 3 characters or more.

I did some Googling but didn't find anything helpful. I turn to you!

(p.s. permissions allow search to everyone, even anon; entire site is indexed, cleared cache, ran cron, )

1410hrs update: ran update, reindexed site, checked permissions, still no clue as to problem

Comments

p.s.

Branjawn's picture

it doesn't even work when logged in as user 1

did you disable CiviCRM and

sheena_d's picture

did you disable CiviCRM and see if it starts working again?

same result

Branjawn's picture

disabled Civi, same results. I also notice something strange I had not noticed before today (and like I said, I haven't used 'search' in a long while)...
Actually, before I go there, should the url be mysite.com/search/node ?

Back to the observation, I noticed on the search page a menu bar of sorts above the search field listing " * Content * Help * Users "
I thought this was a byproduct of Civi, but I've disabled Civi and it's still there.

... so, on Content I search for common terms I know are on my site and I get the error.
... on Help search I cannot get any hits
... on Users, I can get ppl. hmmm...

I don't see the tabs above

sheena_d's picture

I don't see the tabs above the search box on the search page... check permissions.

do you have any search-related modules installed? Did you run update.php? (run it again anyway).

tabs

Branjawn's picture

I see when logged in, not when as anon (sorry for confusion)

should the url be mysite.com/search/node

fchandler's picture

All the sites I have only have "mysite.com/search". Could the Node portion of the address be part of the problem? What if you type in the address w/o the node part? Does it do anything or revert back to the node?

search url

Branjawn's picture

Yeah, I thought that looked funny with the node suffix. I enter mysite.com/search and it loads a proper search page. I search a term I know is on my website and I get my original problem in it's entirety at the questionable url.

Thanks for throwing out the idea though.

tab disappeared

Branjawn's picture

Umm, the "Users" tab just bounced. As in, disappeared.
Ran update.php

tried advance search, same problem: You must include at least one positive keyword with 3 characters or more.

So, why oh why would Content be indexed but Search not work... hmmm...

something is hijacking the

sheena_d's picture

something is hijacking the form. what do you have installed that hooks into search? what is creating those tabs? (that's why I said to check perms, see what is search-related and disabled for anon and that's your culprit)

cookie problem

Branjawn's picture

Could this have anything to do with cookies?

I had a cookie problem (6.17 related) earlier today where I had to change $cookie_domain = 'foc4u.org' to $cookie_domain = '.foc4u.org'; in settings.php because it would not allow user login.

Drupal made me do it

Branjawn's picture

OK, I'm going to reindex the whole site... maybe I'll knit a sweater in the meantime.

the site index is not the

sheena_d's picture

the site index is not the problem.

If you enter a search term of greater than 3 characters and the error message is "please enter a search term of more than 3 characters", the search function is not getting past the form validation. It isn't even getting to the point where it checks the site index. If it checked the site index and found nothing, you would get the standard "there were no results for your query" page.

results

Branjawn's picture

It does say "Your search yielded no results" in addition to the "3 characters" error. I'll try making the character requirement 0 and see what happens.

html for those tabs

Branjawn's picture

here is the html for those tabs, provide any insight?

<div id="content-tabs" class="content-tabs block">
  <div id="content-tabs-inner" class="content-tabs-inner inner clearfix">
    <ul class="tabs primary">
      <li class="active" ><a href="/search/node/about" class="active">Content</a></li>
      <li ><a href="/search/advanced_help/about">Help</a></li>
      <li ><a href="/search/user/about">Users</a></li>
    </ul>
  </div><!-- /content-tabs-inner -->
</div><!-- /content-tabs -->

funny error msg

Branjawn's picture

"You must include at least one positive keyword with 0 characters or more."

I don't know anything about hooks. I did get some images on Bench Charts, but that's not easily transferable to here :\

a shot at hooks

Branjawn's picture

node_grants
node_info
system_info_....
forms
user
info_alter
search
help
rewrite_sql
form_alter
translated_m.....
init
(load)
elements

more investigative work

Branjawn's picture

on the page admin/reports/search it is listing items as I search them. To test, I put in "monkey face" twice and it showed up on that page.

Not CiviCRM

FatherShawn's picture

I can confirm that it's not CiviCRM. Search is working fine on my Drupal 6.17/CiviCRM 3.1 site.

Drupaling in NYC since 2009!

"I can confirm that it's not CiviCRM."

Branjawn's picture

Well, since I just installed for the first time yesterday, it may have been Civi with some setting I made that I shouldn't have and that you don't have enabled.

Although, I did disable the module and am still having the problem, so for that reason I will eliminate Civi as the culprit.

thanks for your input :) Still haven't found a solution (and our church budget for this is $0 which includes me, so I can't hire out any help unfortunately)

hey, it's WSOD! how ya doin!

Branjawn's picture

I'm getting WSOD on Permissions page now. fan-frickin-tastic :)

I just remembered I have backup and migrate module... I think it's time to see if I can backup!

Can you get to the server

jdwfly's picture

Can you get to the server logs? The best place to look is the error.log for the server. That will tell you exactly what is happening. On linux apache servers it is generally in /var/log/apache/error.log.

more testing

Branjawn's picture

tried in Garland, not theme related...
I've torn Permissions apart, can't be anything on there.

Seriously, I've spent 6 hours on this today! $20 to whoever fixes it (that's out of my own pocket!)

showing my ignorance

fchandler's picture

On my search settings page it says "To build and maintain this index, a correctly configured cron maintenance task is required." I have not ever set up a Cron task and run it manually when I log in. Is running Cron the same as re-indexing? Would running Cron help?

running cron

Branjawn's picture

I use poormanscron and it run about every hour or so.

To answer your first question: No. And yes.

Cliff's picture

Running cron is not the same as indexing the site, but it does prompt a re-indexing of the site. I didn't know that either, but your question got me to wondering how I could finally learn what cron does, and I was lucky enough to find the answer by searching drupal.org with "what does cron do? (Other searches and perusals of the documentation were fruitless.)

And in case you missed it earlier in this thread, be sure to read @sheena_d's explanation of how we (using the term very broadly here, because I'd be clueless) can tell that the site index is not the source of the problem.

Yeah

Branjawn's picture

I understand it has something to do with hooks, but I wouldn't even know where to start. So, I just disabled SEARCH because I have no other option. :\

Have you tried IRC

Cliff's picture

@Branjawn, have you tried getting on one of the Drupal IRC channels with this question? I haven't used them that much, but this seems like just the kind of problem that one of the experts there could help you sort through in real time.

Just a thought. And if you do try it, tell us how it works out.

Advanced Help module?

ajross's picture

The "Content" and "User" tabs are a normal part of the core search, but you'll only see tabs if you have administrative access to user info, as otherwise you can't search users and the regular content search is the only option (thus no tab). The /search/node path is normal too. If you go to /search you get the content search, but if you toggle between the Content and User tabs it switches between /search/user and /search/node.

The "Help" tab is not part of the core search, though. It is added by the Advanced Help module (I assume, unless another search-related module adds a tab with that name). So you might try disabling that module, and seeing if that helps. Although the relevant hook it is using is hook_menu() which adds the Help tab and the help search form, but it shouldn't affect the regular content search form, from what I can see. It's worth a shot, though...

http://drupal.org/node/48898#

Content all published?

herrajon's picture

Content all published?