Item8083: Using 'TWiki::Store::SearchAlgorithms::Kino' with RcsLite doesn't work
Priority: Urgent
Current State: Waiting for Feedback
Released In: n/a
Target Release: n/a
There are major issues using
$Foswiki::cfg{RCS}{SearchAlgorithm} = 'TWiki::Store::SearchAlgorithms::Kino';
with RcsLite on Windows.
Doing a search on a keyword, which exists in an attachment, results in
illegal characters in file name component http://foswiki.org/pub of filename D:/web/wiki_d1cm/Foswiki-1.0.0/data/Technologie/ http://foswiki.org/pub/Technologie/MyTopicName/MyAttachmentFile.doc .txt,v
further analysis in perl leads me to the perception that there may be a flaw in line 224 of
lib/Foswiki/Store/RcsLite.pm
:
$this->{rcsFile}
is expanded to "D:/web/wiki_d1cm/Foswiki-1.0.0/data/Technologie/ %PUBURL%/Technologie/MyTopicName/MyAttachmentFile.doc .txt,v ". I can't find where and why it's expanded that way though.
Someone with more knowledge in perl (and Foswiki::...)?
--
JanDreyer
Re-naming the plugin, and needs to check if this still applies.
--
OlivierRaginel - 25 Sep 2009
Yeah this wouldn't work when the plugin was in the TWiki namespace, as
TWikiCompatibilityPlugin doesn't provide the layer for it.
Should work fine now.
--
AndrewJones - 25 Sep 2009
No feedback, but im pretty sure its fixed. Closing.
--
AndrewJones - 20 Oct 2009
JoelWachman has indicated by email that this bug still exists on Windows. Joel, could you please provide some feedback?
Unfortunately I do not have access to a Windows environment, so unless I can reproduce it on Linux I won't be able to fix it.
--
AndrewJones - 08 Dec 2009
I'm running under Windows 2003 Server, using
ActiveState Perl 5.8. Using RcsLite. My Rcs is v5.7-4 from cygwin. Store is set to Foswiki::Store::SearchAlgorithms::Kino.
QueryAlgorithm is Foswiki::Store::QueryAlgorithms::BruteForce (not sure if that matters?). The symptom I'm seeing is identical to the one
JanDreyer describes above. I am able to search the body of my topics, but when I look for text that also occurs in an attachment it shows the same error involving PUBURL. The attachment I'm searching is one that was converted from Word using abiword through kinoupdate.
To reiterate: I have attached a Word document to one of my topics. The document contains the text "bc/dr". When I type "bc/dr" into the search box I get no results and I'm redirected to my topic's
WebSearch page (this is incorrect behavior--it's not trying to search attachments from the search box--but I know that's a different issue). When I type the same string into the
WebSearch page I see the following error at the top of the results page:
Could not perform search. Error was: illegal characters in file name component %PUBURL% of filename C:/fwiki/data/TechnologyWeb/
%PUBURL%/TechnologyWeb/DisasterRecovery/TheDocumentIWanted.doc .txt,v
--
JoelWachman - 14 Dec 2009
I have the same issue as
AndewJones but I am running foswiki under Solaris 10/x86. In my case the search failed when the search item exist in my pdf attachment.
Example error: Could not perform search. Error was: illegal characters in file name component
http://foswiki.org/pub of filename .......
So I am disabling attachment search functionality at the moment.
--
AdliBazuli - 30 Dec 2009
I think I've found the problem. I just don't know how to fix it. Line 153 of lib/Foswiki/Store/Kino.pm reads:
my $url = " %PUBURL%/$resweb/$restopic/$name ";
I tried changing that to:
my $url = "/$resweb/$restopic/$name ";
and re-ran my query looking for the word "Inaccessible" which I know is in my attachment. Lo and behold I got the following response:
Searched: Inaccessible
Topics in TechnologyWeb
/TechnologyWeb/DisasterRecovery/Business_Continuity_and_Disaster_Recovery_Steps.doc attachment
Number of topics: 1
Now, I assume what I'm supposed to see here is a link to the topic or a link to the attachment. I've tried fooling around with several variations on the theme
my $url = "%PUBURL%/$restopic/$name ";
or
my $url = "/$restopic/$name ";
but I can't figure out the answer. Can someone who knows more about
KinoSearch, Foswiki in general help me out? I'm getting close!
--
JoelWachman - 13 Jan 2010
I still can't reproduce it, so the following is untested, but try this path:
Index: lib/Foswiki/Store/SearchAlgorithms/Kino.pm
===================================================================
--- lib/Foswiki/Store/SearchAlgorithms/Kino.pm (revision 6027)
+++ lib/Foswiki/Store/SearchAlgorithms/Kino.pm (working copy)
@@ -149,7 +149,7 @@
if (($showAttachments) &&
( $scope eq 'all' ) ){
my $name = $hit->{name};
- my $url = " http://foswiki.org/pub/$resweb/$restopic/$name ";
+ my $url = Foswiki::Func::getPubUrlPath() . "/$resweb/$restopic/$name ";
#print STDERR "$resweb.$restopic - $name\n";
push( @{ $seen{$url} }, $url );
}
It should create a relative link to the attachment.
--
AndrewJones - 15 Jan 2010
That seems to have almost fixed it. I got:
/wiki/pub/MyWeb/MyWebHome/MyWebTopic/TheAttachment.doc
So I explicitly added "http://localhost" to the beginning of the url. Now I get a url the user can click on to download the document.
Thanks for all your help!
--
JoelWachman - 15 Jan 2010
--
JoelWachman - 15 Jan 2010
OK, so if its looking for an absolute URL, this should be better:
my $url = Foswiki::Func::getUrlHost() . Foswiki::Func::getPubUrlPath() . "/$resweb/$restopic/$name ";
--
AndrewJones - 18 Jan 2010
would someone please confirm this fix so that it can get checked in and the extension re-released?
--
WillNorris - 27 Feb 2010
I tested the patch. it does not the job.
i think you can reproduce the error, if you switch your Store-Method to RCSLite and use the Kino-Searchalgorithm. When i switch to the RCSWrap-Storage, everything seems OK. (testet on ubuntu 10 LTS)
--
StefanStidl - 03 Jul 2010
I have tried changing my configuration to use RCSWrap and now I remember why I was using RCSLite. Under Windows+Cygwin+RCS I get this message when I try to make changes:
During save of TechnologyWeb.DisasterRecovery an error was found by the version control system. Please notify your Foswiki administrator.
/usr/bin/rlog -h %FILENAME|F% of .../TechnologyWeb/DisasterRecovery.txt failed:
Go back in your browser and save your changes locally.
RCS is installed properly but it looks like FWiki is not calling it correctly. Note the "%FILENAME|F%" business...that
can't be right.
--
JoelWachman - 13 Sep 2010
I have no feedback. Not using this kind of setup anymore since last upgraded version of Foswiki.
--
AdliBazuli - 04 Jan 2011
--
JoelWachman - 13 Aug 2011
hoping somebody can take me off the "waiting for feedback" list...
--
JoelWachman - 13 Aug 2011
--
JoelWachman - 21 Apr 2012