Item9924: Stringifying problem with XLSX attachment
Priority: Normal
Current State: Closed
Released In: n/a
Target Release: n/a
When either the kinoupdate or kinoindex is run either in a Cron or via the
KinoSearchPlugin rest, they give errors when processing XLSX files.
Uncaught exception from user code:
Not a HASH reference at /usr/lib/perl5/site_perl/5.8.8/Error.pm line 217.
at /usr/lib/perl5/site_perl/5.8.8/Error.pm line 217
Error::catch('Error', 'CODE(0x2054ce0)', 'Text::IconvPtr=SCALAR(0x1b0da20)') called at /home2/mydomain/public_html/foswiki/lib/Foswiki/Contrib/StringifierContrib/Plugins/XLSX.pm line 34
Foswiki::Contrib::StringifierContrib::Plugins::XLSX::stringForFile('Foswiki::Contrib::StringifierContrib::Plugins::XLSX=HASH(0x1b...', '/home2/mydomain/public_html/foswiki/pub/MyCompany/MyTopicr...') called at /home2/mydomain/public_html/foswiki/lib/Foswiki/Contrib/StringifierContrib.pm line 42
Foswiki::Contrib::StringifierContrib::stringFor('Foswiki::Contrib::StringifierContrib', '/home2/mydomain/public_html/foswiki/pub/MyCompany/MyTopicr...') called at /home2/mydomain/public_html/foswiki/lib/Foswiki/Contrib/KinoSearchContrib/Index.pm line 568
Foswiki::Contrib::KinoSearchContrib::Index::indexAttachment('Foswiki::Contrib::KinoSearchContrib::Index=HASH(0x1a78420)', 'KinoSearch::InvIndexer=HASH(0x1b497b0)', 'MyCompany', 'MyTopic', 'HASH(0x1b18f70)') called at /home2/mydomain/public_html/foswiki/lib/Foswiki/Contrib/KinoSearchContrib/Index.pm line 535
Foswiki::Contrib::KinoSearchContrib::Index::indexTopic('Foswiki::Contrib::KinoSearchContrib::Index=HASH(0x1a78420)', 'KinoSearch::InvIndexer=HASH(0x1b497b0)', 'MyCompany', 'MyTopic', 'WIKIWEBMASTER', 1, 'TopicSummary', 1, 'INCLUDEWARNING', ...) called at /home2/mydomain/public_html/foswiki/lib/Foswiki/Contrib/KinoSearchContrib/Index.pm line 336
Foswiki::Contrib::KinoSearchContrib::Index::addTopics('Foswiki::Contrib::KinoSearchContrib::Index=HASH(0x1a78420)', 'MyCompany', 'MyTopic') called at /home2/mydomain/public_html/foswiki/lib/Foswiki/Contrib/KinoSearchContrib/Index.pm line 116
Foswiki::Contrib::KinoSearchContrib::Index::updateIndex('Foswiki::Contrib::KinoSearchContrib::Index=HASH(0x1a78420)', '') called at ./kinoupdate line 38
Perl Module Spreadsheet:XLSX 0.13
--
BobCorless - 30 Oct 2010
Bob, could you please try the latest version of
StringifierContrib, best the one in SVN? I don't have any hash on line 34 of XLSX.pm anymore.
--
MichaelDaum - 31 Oct 2010
MTempest was good enough to build me a package from the latest trunk for
StringifierContrib. I've manually installed that and that indeed runs without any errors on the XLSX file I was indexing.
--
BobCorless - 31 Oct 2010
Update: Although the HASH issue has gone, the XLSX file is not being indexed at all.
KinoSearch does not return values from the XLSX I am testing.
--
BobCorless - 31 Oct 2010
Is it password protected? Spreadsheet:XLSX won't have a chance to deal with it (a known limitation of the perl lib ... and won't make sense in a wiki anyway). Just asking because I had these problems as well. Maybe you've come accross a different issue. If possible attach your xslx to this bug report, or create a similar one that can be used for reproducing the issue.
Try to process it with the
stringify
programm in the
tools
directory. See if there's any output.
--
MichaelDaum - 31 Oct 2010
It's not password protected. Running ./stringify ../pub/web/topic/spreadsheet.xlsx returns nothing.
--
BobCorless - 31 Oct 2010
As a test, I logged into my old 1.0.9 version and the spreadsheet indexes with no issues and the search term I used in 1.1.1 works in 1.0.9. Definitely a 1.1.1 issue.
--
BobCorless - 01 Nov 2010
Does any of the xls files part of the test suite work out for you? Could you please provide a test file of your own that you know that it doesn't work for you?
--
MichaelDaum - 01 Nov 2010
It's already attached in this topic. I'll test a normal xls file and report back.
--
BobCorless - 01 Nov 2010
Well, surprisingly, a normal xls doesn't get indexed either.
Both the XLSX and the XLS file indexes fine if I add them to a topic in 1.0.9
--
BobCorless - 01 Nov 2010
Please try this patch (fixes it for me):
--- lib/Foswiki/Contrib/StringifierContrib/Plugins/XLSX.pm (revision 9796)
+++ lib/Foswiki/Contrib/StringifierContrib/Plugins/XLSX.pm (working copy)
@@ -32,7 +32,7 @@
require Spreadsheet::XLSX;
} catch Error with {
return '';
- }
+ };
Please keep yourself listed in the
WaitingFor field til this bug is resolved. Thanks.
--
MichaelDaum - 01 Nov 2010
Where does this go exactly? And what do I do? (I'm not a coder, just an above average end user).
--
BobCorless - 01 Nov 2010
Edit the file
lib/Foswiki/Contrib/StringifierContrib/Plugins/XLSX.pm
, go to line 32. See the last closing
}
bracket a few lines below at the code position illustrated in the patch. Then add a single semicolon
;
to the end of the line. So this is a one-character fix in the line.
--
MichaelDaum - 01 Nov 2010
OK. Done!
I cleared out the ./Kinosearch/Index directory and then I ran a full index, rather than update, and the XLSX is now appearing in my search. Thanks. However, the XLS file attachment is still not showing up in the Kinosearch. I'll attach that here as well for completeness, but I suspect you won't need it!
--
BobCorless - 01 Nov 2010
When I run Stringify against the attached xls file, I get this message
....] ./stringify ../pub/MyWeb/MyTopic/conditional_formatting_2.xls
can't read ../pub/MyWeb/MyTopic/conditional_formatting_2.xls at ./stringify line 34.
EDIT: Ignore me. I ran the stringify in the wrong web. All is well, XLS indexes as well.
So it's just that one character fix for the XLSX that got it to work.
--
BobCorless - 01 Nov 2010
That's cool. Thanks, will build an official release soon.
--
MichaelDaum - 02 Nov 2010