This question about Using an extension: Task filed

Plugin doesn't work on subwebs

I was not able to make this plugin work on the subwebs of my Foswiki install. What I had to do to get it working was comment out line 1119 of which replaces any slashes in the Web name with periods. Now it appears to be working fine.

Would there have been a better way for me to correct this or is it a bug?

-- CalebSG - 17 Jul 2013

Could you be more specific other than "doesn't work", please?

In general slash and period are equivalent in web names.

-- MichaelDaum - 18 Jul 2013

Sorry, my bad. This is the error message on the web page with line 1119 in Plugins/DBCachePlugin/ uncommented: "Foswiki detected an internal error - please check your Foswiki logs and webserver logs for more information.

E:path: No such file or directory"

This is the full error message in the wiki error log: 2013-07-18T13:46:36Z warning | E:/Apache24/htdocs/wiki/data/Equipment.Systems: No such file or directory at E:/Apache24/htdocs/wiki/lib/Foswiki/Plugins/DBCachePlugin/ line 1120. at E:/strawberry/perl/lib/ line 354.
No such file ...') called at E:/strawberry/perl/lib/ line 631 Cwd::fast_abs_path('E:/Apache24/htdocs/wiki/data/Equipment.Systems') called at E:/Apache24/htdocs/wiki/lib/Foswiki/Plugins/DBCachePlugin/ line 1120 Foswiki::Plugins::DBCachePlugin::Core::getWebKey('Equipment/Systems') called at E:/Apache24/htdocs/wiki/lib/Foswiki/Plugins/DBCachePlugin/ line 1133 Foswiki::Plugins::DBCachePlugin::Core::getDB('Equipment/Systems') called at E:/Apache24/htdocs/wiki/lib/Foswiki/Plugins/DBCachePlugin/ line 231 Foswiki::Plugins::DBCachePlugin::Core::getTopicTitle('Equipment.Systems', 'CorporateLeadership') called at E:/Apache24/htdocs/wiki/lib/Foswiki/Plugins/DBCachePlugin/ line 100 Foswiki::Plugins::DBCachePlugin::Core::renderWikiWordHandler('CorporateLeadership', undef, 'Equipment/Systems', 'CorporateLeadership') called at E:/Apache24/htdocs/wiki/lib/Foswiki/Plugins/ line 237 Foswiki::Plugins::DBCachePlugin::renderWikiWordHandler('CorporateLeadership', undef, 'Equipment/Systems', 'CorporateLeadership') called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 294 Foswiki::Plugin::invoke('Foswiki::Plugin=HASH(0x1bb3c0c)', 'renderWikiWordHandler', 'CorporateLeadership', undef, 'Equipment/Systems', 'CorporateLeadership') called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 341 Foswiki::Plugins::dispatch('Foswiki::Plugins=HASH(0x173f9a4)', 'renderWikiWordHandler', 'CorporateLeadership', undef, 'Equipment/Systems', 'CorporateLeadership') called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 578 Foswiki::Render::internalLink('Foswiki::Render=HASH(0x1f2b254)', 'Equipment/Systems', 'CorporateLeadership', 'CorporateLeadership', '', 1, '', undef) called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 770 Foswiki::Render::_handleWikiWord('Foswiki::Render=HASH(0x1f2b254)', 'Foswiki::Meta=HASH(0x1f0403c)', 'E:/Apache24/htdocs/wiki/bin', undef, undef) called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 1421 Foswiki::Render::getRenderedVersion('Foswiki::Render=HASH(0x1f2b254)', '---+!! Welcome to the Equipment/Systems web\x{a}---++!! Equi...', 'Foswiki::Meta=HASH(0x1f0403c)') called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 3117 Foswiki::Meta::renderTML('Foswiki::Meta=HASH(0x1f0403c)', '---+!! Welcome to the Equipment/Systems web\x{a}---++!! Equi...') called at E:/Apache24/htdocs/wiki/lib/Foswiki/UI/ line 413 Foswiki::UI::View::_prepare('---+!! %MAKETEXT{"Welcome to the [_1] web" args="Support"}...', 'Foswiki::Meta=HASH(0x1f0403c)', 0) called at E:/Apache24/htdocs/wiki/lib/Foswiki/UI/ line 392 Foswiki::UI::View::view('Foswiki=HASH(0x173ec0c)') called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 316 Foswiki::UI::__ANON__() called at E:/Apache24/htdocs/wiki/lib/CPAN/lib/ line 379 eval {...} called at E:/Apache24/htdocs/wiki/lib/CPAN/lib/ line 371 Error::subs::try('CODE(0x517e1c)', 'HASH(0x173e95c)') called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 435 Foswiki::UI::_execute('Foswiki::Request=HASH(0x1737954)', 'CODE(0x10f7f7c)', 'view', 1) called at E:/Apache24/htdocs/wiki/lib/Foswiki/ line 274 Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x1737954)') called at E:/Apache24/htdocs/wiki/lib/Foswiki/Engine/ line 41 Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x10f29e4)') called |

Once I comment that line back out the page renders fine. Only happens in the one subweb that I have set up.

-- CalebSG - 18 Jul 2013

Got it.

Here's the rub: there's a semantic difference between Cwd::fast_abs_path and Cwd::abs_path. The latter doesn't check for file existence, but fast_abs_path does. Not sure why that could be any faster that way.

DBCachePlugin calls Cwd::abs_path which is rerouted to Cwd::fast_abs_path on some platforms like yours.

The purpose of the getWebKey method is just to get a unique key for a cache to be loaded. There's some normalization required to prevent the same cache to be loaded twice, once for Equipment/Systems and another time for Equipment.Systems.

There's absolutely no need for Cwd to check for file existence at this point.

Will file a bug report and fix it: Tasks.Item12551

-- MichaelDaum - 18 Jul 2013

Fixed in latest version of DBCachePlugin.

-- MichaelDaum - 18 Jul 2013

Great work, Michael.

-- CalebSG - 18 Jul 2013

QuestionForm edit

Subject Using an extension
Extension DBCachePlugin
Version Foswiki 1.1.8
Status Task filed
Related Topics
Topic revision: r5 - 18 Jul 2013, CalebSG - This page was cached on 16 Jan 2018 - 21:10.

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