Item11402: Problem saving topic when SolrPlugin is enabled
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: SolrPlugin
Branches: trunk
I am having issue saving topic when
SolrPlugin is enabled. The error i get is as follows.
Can't use string ("HASH(0x2a861f0)") as a HASH ref while "strict refs" in use
The problem happens when "EnableOnSaveUpdates" parameter is true.
--
TemiVarghese - 03 Jan 2012
Try to run
configure
and save changes. This will create the
$Foswiki::cfg{SolrPlugin}{SupportedLanguages}
hash automatically.
I will make the code more robust in case this hash isn't there.
--
MichaelDaum - 03 Jan 2012
The problem is
Config.spec
using type
*STRING*
rather than
*PERL*
diff --git a/lib/Foswiki/Plugins/SolrPlugin/Config.spec b/lib/Foswiki/Plugins/SolrPlugin/Config.spec
index 0ee6e83..82c641f 100644
--- a/lib/Foswiki/Plugins/SolrPlugin/Config.spec
+++ b/lib/Foswiki/Plugins/SolrPlugin/Config.spec
@@ -78,7 +78,7 @@ $Foswiki::cfg{SolrPlugin}{SolrHome} = '/home/www-data/foswiki/solr';
# Default collection where to put foswiki content to (including topic text as well as all attachments)
$Foswiki::cfg{SolrPlugin}{DefaultCollection} = 'wiki';
-# **STRING**
+# **PERL**
# List of supported languages. These are the locale IDs as supported for by the schema.xml configuration
# file for solr. For each language ID there's a text field named text_<ID> that will be filled
# with content in the appropriate language. A wiki page can be flagged to be in a specific language by
--
PaulHarvey - 09 Jan 2012
Work in progress at
https://github.com/csirac2/SolrPlugin/commit/5a5c371d8c7e60e27e564520332027fbba5c983d
--
PaulHarvey - 09 Jan 2012
Hi Michael,
The github branch I linked to has configure checkers for
SolrStartCmd
,
SupportedLanguages
,
SolrHome
- it will try to guess the setting correctly (on a fresh install), and will detect a b0rked
{SolrPlugin}{SupportedLanguages}
config and will guess as defaults
I believe these checkers will help new users of
SolrPlugin, and also fix any configs where
{SupportedLanguages}
got borked into becoming a string like
... = 'HASH(0x....)';
--
PaulHarvey - 09 Jan 2012
But it needs the
Config.spec
to have an empty
{SolrHome}
, otherwise the
SolrHome
checker won't bother trying to check
--
PaulHarvey - 09 Jan 2012
Added your checkers with some slight modifications to make them work properly.
--
MichaelDaum - 24 Feb 2012