Anonymous search: excerpted text nothing found
quiptime - November 14, 2006 - 11:32
| Project: | SQL Search (Trip Search) |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | joel_guesclin |
| Status: | active |
Jump to:
Description
Following problem. I think that is a usability bug.
Anonymous search results: "k.A. ..."
German "k.A. ..."
English "n/a ..."
One can test it on www.quiptime.de:
http://www.quiptime.de/qt/de/trip_search
and search (for example) for "wlan" or "firefox".
All logged in user do not see "k.A. ..." as part of search results. That is like that correct.
I would like that also Anonymous a correct search result (without "k.A. ..." / "n/a ...") can see.
How can I correct this error?

#1
I have tried this out and can reproduce it in some cases. Apparently it is because the function that highlights the search keys that have been found in the text does not work. However I have not been able to discover why this should happen, nor why there should be a difference between anonymous and logged-in users. I'll work on it and see what I can do!
#2
file trip_search.module
I think, here it happens:
foreach ($results as $item) {$node = node_load(array('nid' => $item['id']));
$comments = $node->comment_count;
$query = module_exist('highlight') ? 'highlight=' . urlencode(trip_search_highlight($parsed_keys)) : null;
$item = array('link' => url('node/'. $item['id'], $query),
'type' => node_invoke($node, 'node_name'),
'title' => $node->title,
'user' => theme('username', $node),
'date' => $node->created, // NODE CHANGED OR CREATED??
// 'extra' => format_plural($comments, '1 comment', '%count comments'), No comments
//print check_markup($node->body, $node->format),
'snippet' => trip_search_excerpt($parsed_keys, check_markup($node->body, $node->format))
);
$str .= theme('trip_search_item', $item, $item['type']);
}
Anonymous with "print check_markup($node->body, $node->format)," see "k.A. ..." as part of search results.
#3
file trip_search.module
//'snippet' => trip_search_excerpt($parsed_keys, check_markup($node->body, $node->format))
'snippet' => trip_search_excerpt($parsed_keys, check_markup($node->body))
fix the problem with anonymous search results "k.A. ..."
But
the next bug is the following:
Anonymous can't find nodes written by superuser (1)!
#4
Sorry, forget
Anonymous can't find nodes written by superuser (1)!
In my site exist nodes only for superuser.
#5
I've just built a new version which fixed the problem on my test site. I do not have any difficulty picking up content created by the superuser. Can you try the new version (1.1 of the module) and let me know how it goes?
#6
Test your version 1.1:
I also programmed: trip_search with multi-language support. Now the module can be localized (also the calendar).
I work still on it (last action is errorstring in calendar.js: 'Sorry, your browser doesn\'t support this funcionality.'). The localized version works. You can test it. Check out: www.quiptime.de
#7
I would like to know what you did to localise the calendar and to allow trip_search to work in a multi-lingual site. I presume you are working with the Internationalization module? Can you make a patch, or the other version of trip_search available? And is the i18n version also usable if you don't have the i18n module installed?