Item1162: SearchEngineKinoSearchAddOn requires manual path configuration after installation although a working entry appears to exist.
Priority: Normal
Current State: Closed
Released In: 1.0.7
Target Release: patch
I've got the following error:
./kinoindex
KinoSearch index files init
- to suppress all normal output: kinoindex -q
Logfile cannot be opend in $TWiki::cfg{PubDir}/../kinosearch/logs/index-20090227.log. at /srv/www/foswiki/lib/TWiki/Contrib/SearchEngineKinoSearchAddOn/KinoSearch.pm line 54.
I just solved it by putting the absolute and correct path via configure into
LocalSite.cfg
.
Only question, is this something where a task should be opened for to see why the pre-configured "$TWiki::cfg{PubDir}/../kinosearch/logs" doesn't work?
Also the
TWikiCompatibilityPlugin is enabled in my system, and at least after editing manually the configuration to fix the paths, it works.
--
IngoKappler - 27 Feb 2009
Seems the configuration isn't expanded from
http://trac.foswiki.org/browser/trunk/core/SearchEngineKinoSearchAddOn/lib/TWiki/Contrib/SearchEngineKinoSearchAddOn/Config.spec?L=25 :
$TWiki::cfg{KinoSearchLogDir} = '$TWiki::cfg{PubDir}/../kinosearch/logs';
Maybe only Foswiki variables are?
(Made this bug
SMART, and asked for feedback from Crawford and Sven)
Ok, found the issue. As I said, only $Foswiki::cfg{} variables are expanded. And we can't really extend this in
(tm)WikiCompatibilityPlugin as we can't (at least not with a code that's maintainable) replace a function within a package by another one, and still call that function.
Thus, my suggestion is simply to add $TWiki::cfg{} there too:
diff --git a/core/lib/Foswiki/Configure/Load.pm b/core/lib/Foswiki/Configure/Load.pm
index a331bb0..bfb3b96 100644
--- a/core/lib/Foswiki/Configure/Load.pm
+++ b/core/lib/Foswiki/Configure/Load.pm
@@ -95,7 +95,7 @@ sub expand {
expand( \%$_ );
}
else {
- s/(\$Foswiki::cfg{[[A-Za-z0-9{}]+})/eval $1||'undef'/ge;
+ s/(\$(?:Fosw|TW)iki::cfg{[[A-Za-z0-9{}]+})/$1||'undef'/gee;
}
}
}
--
OlivierRaginel - 27 Feb 2009
My inclination is to not bother. Port the add-on to the Foswiki namespace, and use
perl build.pl
to build the TWiki version.
--
CrawfordCurrie - 07 Mar 2009
huh? I thought Olivier
had ported it, and so I'm confused and surprised that there is a Tmwiki compatibility issue.
port the sucker
--
SvenDowideit - 08 Mar 2009
I personally use Plucene, therefore I haven't ported Kino. But I had tried to make it work under 1.0.0, to install it for foswiki.org. It missed one thing that Gilmar added (the legacy engine, for scripts that uses some old page generation methods). So now it should work.
The only problem I had was about the configuration, and as I thought this issue would be triggered by a lot more plugins than just Kino, I raised it here.
But anyway, I think someone (might have been me, don't really remember) fixed this in configure, so it should work as-is in Foswiki.
I'll port it anyway, to be sure
--
OlivierRaginel - 08 Mar 2009
WillNorris and
OliverKrueger have been working on porting it on
Item1363
This should solve this, but I'll wait for the completion before closing that one.
--
OlivierRaginel - 19 Jul 2009
Thanks to
AndrewJones for porting
KinoSearchContrib. This should be fixed now, otherwise please re-open.
--
OlivierRaginel - 25 Sep 2009
Just installed the ported
KinoSearchContrib and didn't have such issue anymore. Thanks for the great port, closing this issue now.
--
IngoKappler - 21 Oct 2009