You are here: Foswiki>Tasks Web>Item11481 (07 Jun 2014, GeorgeClark)Edit Attach

Item11481: VarCache fails in SubWebs

pencil
Priority: Urgent
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: VarCachePlugin
Branches:
Reported By: AndreLichtsteiner, VickiBrown
Waiting For:
Last Change By: GeorgeClark
VarCachePlugin fails when used in SubWebs.

We suspect the following code not to work properly when dealing with SubWebs, when $web contains a slash (/) which translate to a subdirectory within $dir, but there is no code responsible to create such a directory.

    my $dir = Foswiki::Func::getWorkArea($pluginName);
    return "$dir/$web\_$topic.txt";

-- AndreLichtsteiner - 30 Jan 2012

I just tripped over this myself.

In my case, I have a web, Typedia and a subweb, BAAPT. I put the VARCACHE directive into BAAPT.LibraryIndex and got an error (no oops template) telling me to look at the webserver log.

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

Can't create file path - No such file or directory

Among many other things, the Apache error log told me
[Mon Apr 21 10:31:51 2014] [error] [client 192.168.1.206] Can't create file /WWW
/web/cfcl/foswiki119/working/work_areas/VarCachePlugin/Typedia/BAAPT_LibraryIndex - No such file or directory, referer: http://wiki.cfcl.com/bin/edit/Typedia/BAAPT/LibraryIndex?t=1398101388;nowysiwyg=1

I created /web/cfcl/foswiki119/working/work_areas/VarCachePlugin/Typedia/ manually.

This needs to be fixed.
  1. Create all necessary subdirs to support subwebs
  2. The error message needed more content: what file path could not be created? (See Item12862)

-- VickiBrown - 21 Apr 2014

Please note that VARCACHE under TWiki 6 does not have this problem.

-- VickiBrown - 21 Apr 2014

Setting this to confirmed. We need a developer to pick up maintenance of VarCachePlugin

-- GeorgeClark - 07 Jun 2014
 
Topic revision: r3 - 07 Jun 2014, GeorgeClark
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