This is what i got when i did a earch on 5.0:

Your search yielded no results

* Check if your spelling is correct.
* Remove quotes around phrases to match each word individually: "blue smurf" will match less than blue smurf.
* Consider loosening your query with OR: blue smurf will match less than blue OR smurf.

Comments

vm’s picture

you don't mention staging the content in administer -> search settings
you do this by clicking on the index site button

you also dont mention running cron.php after staging the content to be indexed. have you taken care of these steps ?

yesman123’s picture

Thank you very much. After I run cron.php, the search worked (I have to enter two times, the first time, it directs me to another search box and I have to enter the text again). Interestingly, when I run cron.php, there was a blank page.

vm’s picture

cron.php is blank. there is no HTML related to cron.php it will always be blank. you should set your server up to run a cronjob which means your server will per the settings you set, will run cron.php automatically.

svihel’s picture

I have to enter two times, the first time, it directs me to another search box and I have to enter the text again

I have no problem with searching itself, but i have this issue too. Its not a big deal, but even a small bug is a bug...
Do anybody know some solution?

svihel’s picture

Nobody have same problem as me?
Nobody know any solution for that?

abx’s picture

I don't have the problem that have to enter twice though. Actually, the search behave pretty strange in my case. (Drupal 5.1) When I type the name that is the title of the node, it found nothing. Sometime, it found something but nothing that is what I've looked for. Ex. the title said "Mr.John goes to school.", I search by the keyword "John" but nothing in the search came up with that one. (I'm not sure but at that time, the same keyword is in Body too. So, to show up some node but not this one is strange though.)

Yes, I got the problem of running cron sometime and decide to go for poormancron module. Always shows 0% index in search setting. I saw many people said it's one of the problem. However, I notice that it did the index of search in the 3 tables in the database.

Not to talk about multi language site, For a couple tests shows nothing. For now, I just turned it off since it's really useless in my case.

svihel’s picture

AFAIK you must first go to admin/settings/search set there how much items you want index, klick on "reindex web" button, then go to admin/logs/status and run cron manually from here. Search might work from here.
But from you example I think it will find something only if you enter "mr.john" because it only work for full words which is not very good. Maybe I have something set bad too...

BTW i have multilanguage site too.

izzysanime’s picture

Well, mine was fixed by running cron

jsimonis’s picture

We've been having the same problem of having to enter the terms twice.

If you enter your search term into the box near the top of the front page, you are taken to the search page -- but you don't get any results. If you put your term in there, then you get results.

What we're doing is trying to place the search box somewhere else on the page -- in a block in the header that also contains the sign-up for our newsletter. However, the search box isn't giving us any results. You can only get results on the actual search page.

It will work, however, if you also turn on the search block and place it somewhere on the page. Then the search block at the top will function properly if you're an anonymous user. Logged in users get a validation error no matter if you use the block we've created at the top, or the one that Drupal creates for the sidebar.

The page is here: http://www.oregondemocrats.org

This is an issue we've been fighting with for some time now.

Thanks.

--
Jenni S.
http://www.nu-look.net
Portland, OR metro area
Contact Me

bardkerbie’s picture

I was having the same problem with a site I'm developing. However, if you edit the search.module file and comment out line 1048:

 $form['#action'] = url('search/node');

the search box behaves properly. Curious little bug.

mrjw’s picture

I tried this and my search is still broken.. Come to think of it, my search hasn't worked since I was using 4.7, once I upgraded to Drupal 5 my search has been displaying "Your search yielded no results" :/

keylope’s picture

The solution was that the form code was incorrect that I placed on my page template.

Authenticated users need to have a form token while anonymous users don't... Here's what I use in my page.tpl.php. I don't use the search block as it didn't really seem to work very well.

<form action="index.php?q=search/node/" method="post" id="search-theme-form">
<input type="text" maxlength="128" name="keys" id="edit-keys" value="" title="Enter the terms you wish to search for." class="search-input" />
<input type="image" name="op" id="edit-submit" value="Search" src="<?php print base_path().path_to_theme() ?>/images/button_search.gif" width="57" height="23" value="search" />

<?php 
global $user;
if($user->uid): 
?>
  <input type="hidden" name="form_token" id="edit-search-form-form-token" value="<?php print drupal_get_token('search_form'); ?>" />
  <input type="hidden" name="form_id" id="edit-search-form" value="search_form" />
<?php else: ?>
  <input type="hidden" name="form_id" id="edit-search-form" value="search_form" />
<?php endif; ?>
</form>

Hope this helps!

primalmedia’s picture

I had the same problem in Drupal 5.3. This essentially worked. Thank you.

VVDFractie’s picture

Dear Keylope,

Thank you for the suggestion now I can place search everywere in my page without blocks.

echoditto_tom’s picture

instead create a custom form_alter hook in a custom module like so:

function mymodule_form_alter($form_id,&$form) {	
  switch($form_id) {
    case 'search_block_form':
      unset($form['#action']);
      break;
  }
}
jazzitup’s picture

I had to enable a search block at the frontpage. By altering a form in a custom module I've fixed my problem: now I can see my search results by using a search block from a frontpage right after my first try of submitting search keywords.

I'm still using D5.7 and I wonder if this has been fixed in >= D5.11.

--
www.jazzit.hr

soupp’s picture

Thanks,

Your solution worked for me at D5.7

Drupal Sites Directory

amariotti’s picture

track

jtjones23’s picture

subscribe

Update:I've tried all the solutions in this thread with no luck. The site was built with Drupal 4.7 and upgraded to Drupal 5. I upgraded the custom theme myself and can't remember if the search worked (on the first try) with 4.7 but I don't think it did.

I'd appreciate any suggestion to get the search field working on the first try.
http://www.reachyouthprogram.org/

Drupal 5.5
Apache 2.2.4
PHP 5.2.4
MySQL 5.0.45

rimma’s picture

I do not what reason causes the search not working. It once work very well, just suddenly it does not anymore.

I just remembered I once empty my access log, but I do not think it will influence research result. the content index is 99 percent. it does not matter what terms I input, there is no any result.

vm’s picture

not that it will help your search problem, but you are 4 secuirty releases behind. Drupal is currently at 5.6, you should update core to provide from the most secure installation.

chrisroditis’s picture

This is what worked for me
set block visibility for the search block to "show only the listed pages" and then set them to
search/node/*
search/node
Hope that works!

Christopher Skauss:my personal blog and The Thelo:my band
Open Music: the universal music revolution

A healthy disregard for the impossible.