You are here: Foswiki>Tasks Web>Item1612 (02 Jun 2018, MichaelDaum)Edit Attach

Item1612: Recognize broken cache files and rebuild them automatically

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: DBCacheContrib
Branches:
Reported By: PhilippLeufke
Waiting For:
Last Change By: MichaelDaum

Description

Although the plugin initially worked, it somehow broke during my first tests with the following query which resulted in a freeze of the Webbrowser (Firefox):
%FORMQUERY{name="q0" search="form='SputterSamplesForm' " web="Hahn"}%
%FORMQUERY{name="q1" query="q0" search="FilmVisible='yes'"}%
%SHOWQUERY{query="q1" header="   * *Topic: Summary:*" format="   * $topic"}%

Before that, the following query worked as expected:
%FORMQUERY{name="q0" search="FilmVisible='yes'" web="Hahn"}%
%SHOWQUERY{query="q0" header="   * *Topic: Summary:*" format="   * $topic"}%

After the Webbrowser crash, the FormQueryPlugin stopped working completely (maybe just a coincidence...). The System topic of this plugin illustrates this nicely. E.g. the example Bullet list showing topic name and summary will be shown below. The chosen {DBCacheContrib}{Archivist} has an influence on the error message.

With "BDB" Archivist

This is the error message that gets printed inline with the rest of the topic, using the setting:

$Foswiki::cfg{DBCacheContrib}{Archivist} = 'Foswiki::Contrib::DBCacheContrib::Archivist::BDB';

% FORMQUERY{name="q1" search="topic=~'FAQ'" web="System"}% :Can't call method "size" without a 
package or object reference at /var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib.pm line 352. 
at /var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib.pm line 352 
Foswiki::Contrib::DBCacheContrib::load('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0xaedbde0)'
) called at /var/lib/foswiki/lib/Foswiki/Plugins/FormQueryPlugin/WebDB.pm line 329 
Foswiki::Plugins::FormQueryPlugin::WebDB::formQueryOnDB('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0xaedbde0)', 'q1', 'topic=~\'FAQ\'', undef, 0, 1) called at /var/lib/foswiki/lib/Foswiki/Plugins
/FormQueryPlugin.pm line 185 Foswiki::Plugins::FormQueryPlugin::__ANON__() called at /usr/share
/perl5/Error.pm line 416 eval {...} called at /usr/share/perl5/Error.pm line 408 
Error::subs::try('CODE(0xaedbac8)', 'HASH(0xaedbc40)') called at /var/lib/foswiki/lib/Foswiki
/Plugins/FormQueryPlugin.pm line 197 
Foswiki::Plugins::FormQueryPlugin::_FORMQUERY('Foswiki=HASH(0x9c90070)', 
'Foswiki::Attrs=HASH(0xad0cb28)', 'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0xac55278)') 
called at /var/lib/foswiki/lib/Foswiki/Func.pm line 2127 
Foswiki::Func::__ANON__('Foswiki=HASH(0x9c90070)', 'Foswiki::Attrs=HASH(0xad0cb28)', 
'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0xac55278)') called at /var/lib/foswiki
/lib/Foswiki.pm line 2772 Foswiki::_expandTagOnTopicRendering('Foswiki=HASH(0x9c90070)', 
'FORMQUERY', 'name="q1" search="topic=~\'FAQ\'" web="System"', 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0xac55278)') called at /var/lib/foswiki/lib/Foswiki.pm line 2677 
Foswiki::_processTags('Foswiki=HASH(0x9c90070)', '---+!! FormQueryPlugin\x{a}\x{a}The 
FormQueryPlugin provides a query ...', 'CODE(0x9f48248)', 16, 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0xac55278)') called at /var/lib/foswiki/lib/Foswiki.pm line 2594 
Foswiki::expandAllTags('Foswiki=HASH(0x9c90070)', 'SCALAR(0x9f48b58)', 'FormQueryPlugin', 
'System', 'Foswiki::Meta=HASH(0xac55278)') called at /var/lib/foswiki/lib/Foswiki.pm line 2951 
Foswiki::handleCommonTags('Foswiki=HASH(0x9c90070)', '---+!! FormQueryPlugin\x{a}\x{a}The 
FormQueryPlugin provides a query ...', 'System', 'FormQueryPlugin', 
'Foswiki::Meta=HASH(0xac55278)') called at /var/lib/foswiki/lib/Foswiki/UI/View.pm line 388 
Foswiki::UI::View::_prepare('---+!! FormQueryPlugin\x{a}\x{a}The FormQueryPlugin provides a 
query ...', 'Foswiki=HASH(0x9c90070)', 'System', 'FormQueryPlugin', 
'Foswiki::Meta=HASH(0xac55278)', 0) called at /var/lib/foswiki/lib/Foswiki/UI/View.pm line 368 
Foswiki::UI::View::view('Foswiki=HASH(0x9c90070)') called at /var/lib/foswiki/lib/Foswiki/UI.pm
 line 287 Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416 eval {...} 
called at /usr/share/perl5/Error.pm line 408 Error::subs::try('CODE(0x9dd50a0)', 
'HASH(0x9eafcf0)') called at /var/lib/foswiki/lib/Foswiki/UI.pm line 355 
Foswiki::UI::_execute('Foswiki::Request=HASH(0x9fcf820)', 'CODE(0x9fcf3e0)', 'view', 1) called 
at /var/lib/foswiki/lib/Foswiki/UI.pm line 258 
Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x9fcf820)') called at /var/lib/foswiki
/lib/Foswiki/Engine/CGI.pm line 26 
Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x9ecd328)') called % SHOWQUERY{format=" * 
$web.$topic?: $summary(25)" header=" * *Topic: Summary:*" query="q1"}% :Query 'q1' is empty 

I guess, the problem is somewhere in DBCacheContrib.

With "Storable" Archivist

Setting the module to $Foswiki::cfg{DBCacheContrib}{Archivist} = 'Foswiki::Contrib::DBCacheContrib::Archivist::Storable'; results in:
% FORMQUERY{name="q1" search="topic=~'FAQ'" web="System"}% :File is not a perl storable at 
../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380. at 
../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380 eval {...} 
called at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380 
Storable::_retrieve('/var/lib/foswiki/working/work_areas/DBCacheContrib/System._Fo...', 1) 
called at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/lock_retrieve.al) line 
361 Storable::lock_retrieve('/var/lib/foswiki/working/work_areas/DBCacheContrib/System._Fo...') 
called at /var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib/Archivist/Storable.pm line 35 
Foswiki::Contrib::DBCacheContrib::Archivist::Storable::getRoot('Foswiki::Contrib::DBCacheContrib::Archivist::Storable=HASH(0x...') called at /var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib.pm line 348 
Foswiki::Contrib::DBCacheContrib::load('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0x9712e08)') called at /var/lib/foswiki/lib/Foswiki/Plugins/FormQueryPlugin/WebDB.pm line 329 
Foswiki::Plugins::FormQueryPlugin::WebDB::formQueryOnDB('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0x9712e08)', 'q1', 'topic=~\'FAQ\'', undef, 0, 1) called at /var/lib/foswiki/lib/Foswiki/Plugins
/FormQueryPlugin.pm line 185 Foswiki::Plugins::FormQueryPlugin::__ANON__() called at /usr/share
/perl5/Error.pm line 416 eval {...} called at /usr/share/perl5/Error.pm line 408 
Error::subs::try('CODE(0x9712af0)', 'HASH(0x9712c68)') called at /var/lib/foswiki/lib/Foswiki
/Plugins/FormQueryPlugin.pm line 197 
Foswiki::Plugins::FormQueryPlugin::_FORMQUERY('Foswiki=HASH(0x84c7070)', 
'Foswiki::Attrs=HASH(0x9543b40)', 'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0x948c288)')
 called at /var/lib/foswiki/lib/Foswiki/Func.pm line 2127 
Foswiki::Func::__ANON__('Foswiki=HASH(0x84c7070)', 'Foswiki::Attrs=HASH(0x9543b40)', 
'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki
/lib/Foswiki.pm line 2772 Foswiki::_expandTagOnTopicRendering('Foswiki=HASH(0x84c7070
'FORMQUERY', 'name="q1" search="topic=~\'FAQ\'" web="System"', 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki.pm line 2677 
Foswiki::_processTags('Foswiki=HASH(0x84c7070)', '---+!! FormQueryPlugin\x{a}\x{a}The 
FormQueryPlugin provides a query ...', 'CODE(0x877f250)', 16, 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki.pm line 2594 
Foswiki::expandAllTags('Foswiki=HASH(0x84c7070)', 'SCALAR(0x877fb60)', 'FormQueryPlugin', 
'System', 'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki.pm line 2951 
Foswiki::handleCommonTags('Foswiki=HASH(0x84c7070)', '---+!! FormQueryPlugin\x{a}\x{a}The 
FormQueryPlugin provides a query ...', 'System', 'FormQueryPlugin', 
'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki/UI/View.pm line 388 
Foswiki::UI::View::_prepare('---+!! FormQueryPlugin\x{a}\x{a}The FormQueryPlugin provides a 
query ...', 'Foswiki=HASH(0x84c7070)', 'System', 'FormQueryPlugin', 
'Foswiki::Meta=HASH(0x948c288)', 0) called at /var/lib/foswiki/lib/Foswiki/UI/View.pm line 368 
Foswiki::UI::View::view('Foswiki=HASH(0x84c7070)') called at /var/lib/foswiki/lib/Foswiki/UI.pm
 line 287 Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416 eval {...} 
called at /usr/share/perl5/Error.pm line 408 Error::subs::try('CODE(0x860c0a0)', 
'HASH(0x86e6d38)') called at /var/lib/foswiki/lib/Foswiki/UI.pm line 355 
Foswiki::UI::_execute('Foswiki::Request=HASH(0x8806820)', 'CODE(0x88063e0)', 'view', 1) called 
at /var/lib/foswiki/lib/Foswiki/UI.pm line 258 
Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x8806820)') called at /var/lib/foswiki
/lib/Foswiki/Engine/CGI.pm line 26 
Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x8704328)') called at /usr/lib/cgi-bin
/foswiki/view line 45, at /var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib/Archivist
/Storable.pm line 35 at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable
/logcroak.al) line 76 Storable::logcroak('File is not a perl storable at ../../lib/Storable.pm 
(autospl...') called at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable
/_retrieve.al) line 382 Storable::_retrieve('/var/lib/foswiki/working/work_areas/DBCacheContrib
/System._Fo...', 1) called at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable
/lock_retrieve.al) line 361 Storable::lock_retrieve('/var/lib/foswiki/working/work_areas
/DBCacheContrib/System._Fo...') called at /var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib
/Archivist/Storable.pm line 35 
Foswiki::Contrib::DBCacheContrib::Archivist::Storable::getRoot('Foswiki::Contrib::
::Archivist::Storable=HASH(0x...') called at /var/lib/foswiki/lib/Foswiki/Contrib
/DBCacheContrib.pm line 348 
Foswiki::Contrib::DBCacheContrib::load('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0x9712e08)'
) called at /var/lib/foswiki/lib/Foswiki/Plugins/FormQueryPlugin/WebDB.pm line 329 
Foswiki::Plugins::FormQueryPlugin::WebDB::formQueryOnDB('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0x9712e08)', 'q1', 'topic=~\'FAQ\'', undef, 0, 1) called at /var/lib/foswiki/lib/Foswiki/Plugins
/FormQueryPlugin.pm line 185 Foswiki::Plugins::FormQueryPlugin::__ANON__() called at /usr/share
/perl5/Error.pm line 416 eval {...} called at /usr/share/perl5/Error.pm line 408 
Error::subs::try('CODE(0x9712af0)', 'HASH(0x9712c68)') called at /var/lib/foswiki/lib/Foswiki
/Plugins/FormQueryPlugin.pm line 197 
Foswiki::Plugins::FormQueryPlugin::_FORMQUERY('Foswiki=HASH(0x84c7070)', 
'Foswiki::Attrs=HASH(0x9543b40)', 'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0x948c288)')
 called at /var/lib/foswiki/lib/Foswiki/Func.pm line 2127 
Foswiki::Func::__ANON__('Foswiki=HASH(0x84c7070)', 'Foswiki::Attrs=HASH(0x9543b40)', 
'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki
/lib/Foswiki.pm line 2772 Foswiki::_expandTagOnTopicRendering('Foswiki=HASH(0x84c7070)', 
'FORMQUERY', 'name="q1" search="topic=~\'FAQ\'" web="System"', 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki.pm line 2677 
Foswiki::_processTags('Foswiki=HASH(0x84c7070)', '---+!! FormQueryPlugin\x{a}\x{a}The 
FormQueryPlugin provides a query ...', 'CODE(0x877f250)', 16, 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki.pm line 2594 
Foswiki::expandAllTags('Foswiki=HASH(0x84c7070)', 'SCALAR(0x877fb60)', 'FormQueryPlugin', 
'System', 'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki.pm line 2951 
Foswiki::handleCommonTags('Foswiki=HASH(0x84c7070)', '---+!! FormQueryPlugin\x{a}\x{a}The 
FormQueryPlugin provides a query ...', 'System', 'FormQueryPlugin', 
'Foswiki::Meta=HASH(0x948c288)') called at /var/lib/foswiki/lib/Foswiki/UI/View.pm line 388 
Foswiki::UI::View::_prepare('---+!! FormQueryPlugin\x{a}\x{a}The FormQueryPlugin provides a 
query ...', 'Foswiki=HASH(0x84c7070)', 'System', 'FormQueryPlugin', 
'Foswiki::Meta=HASH(0x948c288)', 0) called at /var/lib/foswiki/lib/Foswiki/UI/View.pm line 368 
Foswiki::UI::View::view('Foswiki=HASH(0x84c7070)') called at /var/lib/foswiki/lib/Foswiki/UI.pm
 line 287 Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416 eval {...} 
called at /usr/share/perl5/Error.pm line 408 Error::subs::try('CODE(0x860c0a0)', 
'HASH(0x86e6d38)') called at /var/lib/foswiki/lib/Foswiki/UI.pm line 355 
Foswiki::UI::_execute('Foswiki::Request=HASH(0x8806820)', 'CODE(0x88063e0)', 'view', 1) called 
at /var/lib/foswiki/lib/Foswiki/UI.pm line 258 
Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x8806820)') called at /var/lib/foswiki
/lib/Foswiki/Engine/CGI.pm line 26 
Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x8704328)') called % SHOWQUERY{format=" *
 $web.$topic?: $summary(25)" header=" * *Topic: Summary:*" query="q1"}% :Query 'q1' is empty 

System Info

The server is running Debian stable with following foswiki and perl packages installed:

Package Version
foswiki 1.0.5-1
foswiki-attachcontentplugin 081124-194
foswiki-attachlinkplugin 081224-194
foswiki-autocompletionlibplugin 090316-194
foswiki-batchuploadplugin 090320-194
foswiki-comparerevisionsaddon 090428-194
foswiki-dbcachecontrib 090409-194
foswiki-dbicontrib 090320-194
foswiki-editrowplugin 090225-194
foswiki-excelimportexportplugin 090313-194
foswiki-filterplugin 090418-194
foswiki-findelsewhereplugin 090326-194
foswiki-formplugin 090317-194
foswiki-formqueryplugin 090409-194
foswiki-foswikisiteskin 090417-194
foswiki-fugueiconscontrib 090421-194
foswiki-genpdfaddon 090301-194
foswiki-getawebplugin 090220-194
foswiki-glueplugin 090418-194
foswiki-gouptotocplugin 090203-194
foswiki-historyplugin 081217-194
foswiki-imagegalleryplugin 090425-194
foswiki-imageplugin 090425-194
foswiki-jhotdrawplugin 090206-194
foswiki-jquerycompatibilitymodeplugin 090315-194
foswiki-mathmodeplugin 090424-194
foswiki-mediaplugin 090509-194
foswiki-moveabletypeskin 090220-194
foswiki-publishplugin 090327-194
foswiki-redirectplugin 090410-194
foswiki-subscribeplugin 081204-194
foswiki-topiclistplugin 090203-194
foswiki-widgetsskin 090512-194
gnuift-perl 0.1.14-9
libalgorithm-diff-perl 1.19.02-1
libapache2-mod-perl2 2.0.4-5
libapache2-reload-perl 0.10-2
libarchive-zip-perl 1.18-1
libberkeleydb-perl 0.34-1+b1
libbit-vector-perl 6.4-7+b1
libbsd-resource-perl 1.28-1+b1
libcarp-clan-perl 6.00-1
libcgi-session-perl 4.35-1
libcompress-raw-zlib-perl 2.012-1
libcompress-zlib-perl 2.012-1
libconfig-inifiles-perl 2.39-5
libconvert-asn1-perl 0.21-1
libconvert-binhex-perl 1.119+pristine-3
libcrypt-smbhash-perl 0.12-2
libcrypt-ssleay-perl 0.57-1+b1
libdate-calc-perl 5.4-5+b1
libdate-manip-perl 5.54-1
libdbd-mysql-perl 4.007-1
libdbi-perl 1.605-1
libdevel-symdump-perl 2.08-1
libdigest-hmac-perl 1.01-7
libdigest-md4-perl 1.5.dfsg-1.2+b1
libdigest-sha1-perl 2.11-2+b1
liberror-perl 0.17-1
libexpect-perl 1.20-1
libfile-copy-recursive-perl 0.36-1
libfile-path-expand-perl 1.02-1
libfile-rsyncp-perl 0.68-1.1+b1
libfile-temp-perl 0.20-1
libfinance-quote-perl 1.13-3
libfont-afm-perl 1.20-1
libglib-perl 1:1.190-2
libgnome2-vfs-perl 1.080-1+b1
libgraphics-magick-perl 1.1.11-3.2
libhtml-format-perl 2.04-2
libhtml-parser-perl 3.56-1+b1
libhtml-tableextract-perl 2.10-3
libhtml-tagset-perl 3.20-2
libhtml-template-perl 2.9-1
libhtml-tree-perl 3.23-1
libhttp-cache-transparent-perl 1.0-1
libio-compress-base-perl 2.012-1
libio-compress-zlib-perl 2.012-1
libio-pty-perl 1:1.07-1+b1
libio-socket-ssl-perl 1.16-1
libio-stringy-perl 2.110-4
libio-stty-perl 0.02-10
libio-zlib-perl 1.09-1
libjcode-pm-perl 2.06-1
liblocale-gettext-perl 1.05-4
liblocale-maketext-lexicon-perl 0.66-1
libmail-sendmail-perl 0.79-5
libmail-spf-perl 2.005-1
libmail-spf-query-perl 1:1.999.1-3
libmailtools-perl 2.03-1
libmime-perl 5.427-1
libmime-tools-perl 5.427-1
libmldbm-perl 2.01-2
libnet-cidr-lite-perl 0.20-2
libnet-daemon-perl 0.38-1.1
libnet-dbus-perl 0.33.6-1+b1
libnet-dns-perl 0.63-2
libnet-ip-perl 1.25-2
libnet-ldap-perl 1:0.36-1
libnet-ssleay-perl 1.35-1
libnetaddr-ip-perl 4.007+dfsg-2+b1
libnews-nntpclient-perl 0.37-7
libole-storage-lite-perl 0.17-1
libparse-recdescent-perl 1.95.1+dfsg-3
libparse-yapp-perl 1.05-11
libperl5.10 5.10.0-19
libplrpc-perl 0.2017-1.1
libsocket6-perl 0.20-1
libspreadsheet-parseexcel-perl 0.3200-2
libspreadsheet-writeexcel-perl 2.22-1
libsys-hostname-long-perl 1.4-2
libsys-syslog-perl 0.26-1
libterm-readline-gnu-perl 1.17a-2+b1
libtext-charwidth-perl 0.04-5+b1
libtext-diff-perl 0.35-3
libtext-iconv-perl 1.7-1+b1
libtext-template-perl 1.44-1.2
libtext-wrapi18n-perl 0.06-6
libtime-modules-perl 2006.0814-2
libtimedate-perl 1.1600-9
libunicode-map-perl 0.112-10+b1
libunicode-map8-perl 0.12-3+b1
libunicode-maputf8-perl 1.11-2
libunicode-string-perl 2.09-3+b1
libuniversal-require-perl 0.11-1
liburi-perl 1.35.dfsg.1-1
libuuid-perl 0.02-3+b1
libwww-perl 5.813-1
libxml-dom-perl 1.44-1
libxml-handler-trees-perl 0.02-5
libxml-libxml-common-perl 0.13-6+b1
libxml-libxml-perl 1.66-1+b1
libxml-namespacesupport-perl 1.09-3
libxml-parser-perl 2.36-1.1+b1
libxml-perl 0.08-1
libxml-regexp-perl 0.03-7
libxml-sax-expat-perl 0.40-1
libxml-sax-perl 0.16+dfsg-3
libxml-twig-perl 1:3.32-1
libxml-writer-perl 0.604-1
libxml-xql-perl 0.68-4
perl 5.10.0-19
perl-base 5.10.0-19
perl-doc 5.10.0-19
perl-modules 5.10.0-19
perl-suid 5.10.0-19
perl-tk 1:804.028-1+b1
perlmagick 7:6.3.7.9.dfsg2-1~lenny1


Debugging

I disabled all plugins and only enabled FormQueryPlugin. Still got the same errors.

Nobody interested in fixing this bug? I need this plugin...

-- PhilippLeufke - 24 May 2009

The code of the DBCacheContrib has changed a great deal since you reported this; please try again!

-- CrawfordCurrie - 30 Jun 2009

After upgrading to the latest debian packages ( foswiki-dbcachecontrib version 090619-195 ), the error message is more or less unchanged:
% FORMQUERY{name="q1" search="topic=~'FAQ'" web="System"}% :Can't call method "size" without a package
 or object reference at /var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib.pm line 419. at 
/var/lib/foswiki/lib/Foswiki/Contrib/DBCacheContrib.pm line 419 Foswiki::Contrib::DBCacheContrib::load('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0xb372348)') 
called at /var/lib/foswiki/lib/Foswiki/Plugins/FormQueryPlugin/WebDB.pm line 329 Foswiki::Plugins::FormQueryPlugin::WebDB::formQueryOnDB('Foswiki::Plugins::FormQueryPlugin::WebDB=HASH(0xb372348)',
 'q1', 'topic=~\'FAQ\'', undef, 0, 1) called at /var/lib/foswiki/lib/Foswiki/Plugins/FormQueryPlugin.pm 
line 185 Foswiki::Plugins::FormQueryPlugin::__ANON__() called at /usr/share/perl5/Error.pm line 416 
eval {...} called at /usr/share/perl5/Error.pm line 408 Error::subs::try('CODE(0xb1a3c68)', 
'HASH(0xb3721a8)') called at /var/lib/foswiki/lib/Foswiki/Plugins/FormQueryPlugin.pm line 197 Foswiki::Plugins::FormQueryPlugin::_FORMQUERY('Foswiki=HASH(0x9e73098)', 
'Foswiki::Attrs=HASH(0xb1a3d28)', 'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0xaf00980)') called 
at /var/lib/foswiki/lib/Foswiki/Func.pm line 2127 Foswiki::Func::__ANON__('Foswiki=HASH(0x9e73098)', 'Foswiki::Attrs=HASH(0xb1a3d28)', 'FormQueryPlugin', 'System', 'Foswiki::Meta=HASH(0xaf00980)') called 
at /var/lib/foswiki/lib/Foswiki.pm line 2772 Foswiki::_expandTagOnTopicRendering('Foswiki=HASH(0x9e73098)', 
'FORMQUERY', 'name="q1" search="topic=~\'FAQ\'" web="System"', 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0xaf00980)') called at /var/lib/foswiki/lib/Foswiki.pm line 2677 
Foswiki::_processTags('Foswiki=HASH(0x9e73098)', '---+!! FormQueryPlugin\x{a}\x{a}The FormQueryPlugin 
provides a query ...', 'CODE(0xa12ae98)', 16, 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0xaf00980)') called at /var/lib/foswiki/lib/Foswiki.pm line 2594 Foswiki::expandAllTags('Foswiki=HASH(0x9e73098)', 'SCALAR(0xa12b7a8)', 'FormQueryPlugin', 'System', 
'Foswiki::Meta=HASH(0xaf00980)') called at /var/lib/foswiki/lib/Foswiki.pm line 2951 Foswiki::handleCommonTags('Foswiki=HASH(0x9e73098)', '---+!! FormQueryPlugin\x{a}\x{a}The 
FormQueryPlugin provides a query ...', 'System', 'FormQueryPlugin', 'Foswiki::Meta=HASH(0xaf00980)') 
called at /var/lib/foswiki/lib/Foswiki/UI/View.pm line 388 Foswiki::UI::View::_prepare('---+!! 
FormQueryPlugin\x{a}\x{a}The FormQueryPlugin provides a query ...', 'Foswiki=HASH(0x9e73098)', 'System', 
'FormQueryPlugin', 'Foswiki::Meta=HASH(0xaf00980)', 0) called at /var/lib/foswiki/lib/Foswiki/UI/View.pm 
line 368 Foswiki::UI::View::view('Foswiki=HASH(0x9e73098)') called at /var/lib/foswiki/lib/Foswiki/UI.pm 
line 287 Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 416 eval {...} called at 
/usr/share/perl5/Error.pm line 408 Error::subs::try('CODE(0x9fb8150)', 'HASH(0xaf0ea20)') called at 
/var/lib/foswiki/lib/Foswiki/UI.pm line 355 Foswiki::UI::_execute('Foswiki::Request=HASH(0xa1b27e8)', 
'CODE(0xa1b23a8)', 'view', 1) called at /var/lib/foswiki/lib/Foswiki/UI.pm line 258 Foswiki::UI::handleRequest('Foswiki::Request=HASH(0xa1b27e8)') called at 
/var/lib/foswiki/lib/Foswiki/Engine/CGI.pm line 26 Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0xa0b02a8)') 
called % SHOWQUERY{format=" * $web.$topic?: $summary(25)" header=" * *Topic: Summary:*" query="q1"}% 
:Query 'q1' is empty 

One question: are the configuration variables of DBCacheContib hidden now in configure or did I just not see them? My settings in LocalSite.cfg are:
 $Foswiki::cfg{Plugins}{FormQueryPlugin}{Enabled} = 1;
 $Foswiki::cfg{Plugins}{FormQueryPlugin}{Module} = 'Foswiki::Plugins::    FormQueryPlugin';
 $Foswiki::cfg{DBCacheContrib}{Archivist} = 'Foswiki::Contrib::    DBCacheContrib::Archivist::BDB';
 $Foswiki::cfg{DBCacheContrib}{AlwaysUpdateCache} = 1;
 $Foswiki::cfg{DBCacheContrib}{LoadFileLimit} = 0;

Any tips for debugging are highly appreciated!

(BTW: Looks like the release history in DBCacheContrib is a little outdated...)

-- PhilippLeufke - 30 Jun 2009

With the most recent debian packages, this error seems to have disappeared...

Closing this bug.

-- PhilippLeufke - 08 Sep 2009

Well, with the most recent debian packages, the bug is back again!; reopening it...

Strange...

-- PhilippLeufke - 15 Feb 2010

Solution

Deleting the approptiate *._FormQueryCache file in /var/lib/foswiki/working/work_areas/DBCacheContrib did the trick.

So my suggestion for the future (enhancement): Recognize broken cache files and delete them automatically.

-- PhilippLeufke

i have also had this problem (and solved it the same way) when my hosting provider changed the server i was on, and the new cpu storage format was incompatible with the old. changing title to recommendation above.

-- WillNorris - 07 Apr 2010

We also encountered "working" queries which were missing some query results until the cache file was deleted for rebuilding. It was easy to test, as the same query using VarSEARCH returned more results than the FormQueryPlugin before the rebuild.

Not sure if this bug is related or if I should open a new bug for this...

-- PhilippLeufke - 08 Apr 2010

Long time no action. Please reopen when somebody could verify the bug.

-- MichaelDaum - 02 Jun 2018
 

ItemTemplate edit

Summary Recognize broken cache files and rebuild them automatically
ReportedBy PhilippLeufke
Codebase 1.0.9, 1.0.6
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component DBCacheContrib
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r11 - 02 Jun 2018, MichaelDaum
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