When I use the site search always come out two sections of different links. The first section has the "Matching filestore". All the URL's of this section are wrong and address to "Object not found pages. Error 404".

The second section "Matching nodes ranked in order of relevance:" is always all right.

Has anyone else experienced this problem?

Is there any way to get rid of the "Matching filestore" section? The "Matching nodes section" fulfils my needs. I can't find the piece of code where is defined.

Comments

killes@www.drop.org’s picture

Project: Drupal core » Filestore
Component: node system » Code

Filestore problem.

Dumbascii’s picture

You can disable the search checkbox and the strange results by editing the filestore.module. Comment out the entire function

function filestore_search($keys) {
  global $user;
  $result = db_query("SELECT n.*, f.* FROM {filestore} f LEFT JOIN {node} n ON n.nid = f.nid WHERE n.status = '1' AND (n.title LIKE '%$keys%' OR n.body LIKE '%$keys%' OR f.fileauthor LIKE '%$keys%' OR f.filename LIKE '%$keys%') LIMIT 20");
  while ($file = db_fetch_object($result)) {
    $find[$i++] = array("title" => check_output($file->title), "link" => (user_access($user, "administer nodes") ? "admin/node/edit/$file->nid" : "node/view/$file->nid"), "user" => $file->name, "date" => $file->changed);
  }
  return $find;
}
gordon’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Uwe Hermann’s picture

Version: » master
Status: Fixed » Closed (fixed)