Item9128: Combining TABLE2EXCEL with SEARCH causes apache error!

Priority: Urgent
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: ExcelImportExportPlugin
Reported By: BigBaaadBob
Waiting For:
Last Change By: GeorgeClark
Combining TABLE2EXCEL with SEARCH fails!

Here is an example use:


| *Name* | *Title* | *Author* |
%SEARCH{"<search stuff>"  type="query" nosearch="on"  format="| [[$topic]] | $formfield(DocumentTitle) | $formfield(DocumentAuthor) |" }%

Clicking on the "export" button gives:

Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.

Can't locate object method "_SEARCH" via package "Foswiki"

Apache says:
[Tue Jun 08 16:14:12 2010] [error] [client] Can't locate object method "_SEARCH" via package\
 "Foswiki" at /var/lib/foswiki/lib/Foswiki/Plugins/ExcelImportExportPlugin/ line 679., referer: ht\

This is version: foswiki-excelimportexportplugin 090313-205

-- BigBaaadBob - 08 Jun 2010

I can confirm this with most recent debian packages from

Interestingly, the error also appears when the SEARCH is not actually generating the content of the table, but also if a SEARCH is embedded in an EDITTABLE string (here: for a "select" list).

Another error message (apache2) says:
[Mon Jun 28 13:12:04 2010] [error] [client XXX.XXX.XXX.197] Use of uninitialized value within %type in string eq at
/var/lib/foswiki/lib/Foswiki/Plugins/ExcelImportExportPlugin/ line 750 (#1), referer: http://XXX.XX/Sandbox/ExcelExportTest

BTW: There is also a bug about the debian package, as I had to make the scripts in /var/lib/foswiki/bin executable manually.

-- PhilippLeufke - 28 Jun 2010

I'm no expert - but the offending code for the _SEARCH error may stem from:

my ( $meta, $text ) = Foswiki::Func::readTopic( $web, $basetopic );

$text =~ s/%SEARCH{(.*)}%/$session->_SEARCH( new Foswiki::Attrs($1), $basetopic, $web )/geo;

-- DanielReichert - 21 Jul 2010

I replaced the above line with:
my $topicObject = Foswiki::Meta->new( $session, $web, $basetopic );
$text = $topicObject->expandMacros($topicObject->text());
and that seems to work for me. I don't know anything about the code, though.

-- MathijsMHlmann - 20 Mar 2012

This is tagged confirmed and urgent, but is four years old and open. Has the extension been abandoned?

-- JacobEtches - 14 Jul 2014

The extension is marked as "CoordinateWithAuthor" so someone needs to contact the author and either ask them to maintain the extension or get their agreement that it can be maintained by the project. I'll set this waiting for feedback and see if the author responds. Note that calls to internal functions, like $session->_SEARCH are bad practice. The internal routines, especially any routine beginning with an underscore are private methods that are subject to change on any foswiki release. They should never be accessed.

-- GeorgeClark - 15 Jul 2014

Unfortunately I am not able to maintain this plugin anymore. Feel free to work with it.

-- SvenHess - 21 Dec 2014

ItemTemplate edit

Summary Combining TABLE2EXCEL with SEARCH causes apache error!
ReportedBy BigBaaadBob
Codebase 1.0.9
SVN Range
AppliesTo Extension
Component ExcelImportExportPlugin
Priority Urgent
CurrentState Confirmed
TargetRelease n/a
ReleasedIn n/a
Topic revision: r9 - 23 Dec 2014, GeorgeClark - This page was cached on 26 Jan 2021 - 13:03.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy