Tags:
create new tag
view all tags

Question

I am trying to understand how the TWiki SEARCH function works. It seems to be failing and I cannot begin to debug it until I know more about it.

As I point out in SiteMapTableEmpty my local Site map has suddenly gone empty. Even Main and TWiki webs are no longer listed. I am puzzled and at a loss to understand.

I tried to create a simple test case to show me the results returned from SEARCH. As near as I can tell, NOTHING is being returned.

What do I look for? Where do I look? What can I change?

What has broken?

Losing such simple standard functionality undermines my faith in the stability of TWiki...

HELP?

Environment

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: FreeBSD 4.7
Web server: Apache 2
Perl version: 5.8.5
Client OS:  
Web Browser:  
Categories: Search

-- VickiBrown - 22 Mar 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Probale answer is TextBodySearchNoResults since topic search works on your site.

-- PeterThoeny - 22 Mar 2006

It's really difficult to believe that egrep just suddenluy stopped working. The SiteMap was there a week ago ;-(

But trying the suggestions in TextBodySearchNoResults...

SafeEnvPath is (was) /bin:/usr/bin
{RCS}{EgrepCmd} is (was) /usr/bin/egrep
{RCS}{FgrepCmd} is (was) /usr/bin/fgrep

`which egrep` yields /usr/bin/egrep `which fgrep` yields /usr/bin/fgrep

Good guess. Wrong answer.

Anyone care to try again? Please??

-- VickiBrown - 24 Mar 2006

Your sitemap source works perfectly in my installation - I'm left to wild guesses.

  • Do you have entries for EgrepCmd or FgrepCmd in your lib/LocalSite.cfg? Compare them with the entries in lib/TWiki.cfg - they should have a couple of parameters.
  • And, just to be sure, poke at /usr/bin/fgrep and /usr/bin/egrep. Those usually are simple shell wrappers around grep. Are they world-executable? Do they contain a correct shebang line?

-- HaraldJoerg - 24 Mar 2006

in lib/LocalSite.cfg

$cfg{RCS}{EgrepCmd} = "/usr/bin/egrep"; # /bin/egrep
$cfg{RCS}{FgrepCmd} = "/usr/bin/fgrep"; # /bin/fgrep

in lib/TWiki.cfg

$cfg{RCS}{EgrepCmd} = "/bin/egrep" . ' %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FIL
ES|F%';

# **PATH**
# Full path to GNU-compatible fgrep program. This is used for searching.
$cfg{RCS}{FgrepCmd} = "/bin/fgrep" . ' %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FIL
ES|F%';

hmmmm... I don't have bin/egrep OR bin/fgrep. Why does it think I do? Sadly, changing these to /usr/bin/?grep doesn't help...

My commands are "real" binaries (this is FreeBSD)

> Your sitemap source works perfectly in my installation - I'm left to wild guesses

Yes, well, it's unchanged and used to work perfectly on my site too. Wild Guesses are the order of the day.

-- VickiBrown - 24 Mar 2006

TWiki.cfg doesn't really think about where binaries are - these are just the defaults. During installation/upgrade, the "real" paths should be written to LocalSite.cfg if they are differing from the defaults. In your case, it looks as if the parameters got lost during that process.

Try to "adopt" the parameter syntax from TWiki.cfg to your LocalSite.cfg:

in lib/LocalSite.cfg, write

$cfg{RCS}{EgrepCmd} = "/usr/bin/egrep" . ' %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';
$cfg{RCS}{FgrepCmd} = "/usr/bin/fgrep" . ' %CS{|-i}% %DET{|-l}% -H -- %TOKEN|U% %FILES|F%';

(you can do this via /bin/configure, but since you seem to have shell access, I'd think it is easier with an editor)

-- HaraldJoerg - 25 Mar 2006

Thankyouthankyouthankyouthankyouthankyou.

It Works again!

-- VickiBrown - 26 Mar 2006

Good to see that your site is OK now. So it was the {RCS}{EgrepCmd}, {RCS}{FgrepCmd} setting after all as suggested in TextBodySearchNoResults.

-- PeterThoeny - 26 Mar 2006

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 2006-03-26 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.