Item12673: DBCacheContrib fails to build cache for webs where a topic has section names containing period

Priority: Normal
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: DBCacheContrib
Branches: trunk
Reported By: LynnwoodBrown
Waiting For:
Last Change By: MichaelDaum
I suspect that this is closely related to the problem described in Item11752. I discovered this while trying to debug why the dbcache would not build for a particular web. The error log showed repeated lines such as this: "no map found to store _sectionTable18.1". Searching out the topic that containing this section, I replaced the periods with underscores in all the section names. Then the dbcache was created without problem.

-- LynnwoodBrown - 01 Dec 2013

Can't confirm the dbcache not being build at all. It is created just fine. Only the section value isn't stored. Your section names just aren't valid for DBCacheContrib as any dot notation is used to reference elements inside Map objects. A section name containing a dot is then misinterpreted as such.

Try this patch:

--- lib/Foswiki/Contrib/DBCacheContrib/   (revision 17114)
+++ lib/Foswiki/Contrib/DBCacheContrib/   (working copy)
@@ -240,7 +240,8 @@
             $map->set( $field, $val );
         else {
-            print STDERR "ERROR: no map found to store $attr.$field\n";
+            #print STDERR "ERROR: no map found to store $attr.$field\n";
+            $this->STORE( $attr, $val );
     else {

I haven't run the unit tests yet. But I expect them to fail in other places now.

-- MichaelDaum - 02 Dec 2013

Regarding whether the cache gets built, all I can confirm is that the cache file was not getting created before I fixed the topic with the periods in section names and afterwards it did get created. As for the dot not being a valid section name, I had wondered about that so I searched any docs I could find regarding section names and did not find anything saying that including a dot was not allowed. At the very least, it should be noted if these are not considered "valid."

I'll apply the modification above and test it out. Thanks!

-- LynnwoodBrown - 03 Dec 2013

The error was only reported to STDERR, i.e. the caching process didn't throw an error. So the reason your cache was not created before seems unrelated to this task.

-- MichaelDaum - 11 Dec 2013

ItemTemplate edit

Summary DBCacheContrib fails to build cache for webs where a topic has section names containing period
ReportedBy LynnwoodBrown
Codebase 1.1.8
SVN Range
AppliesTo Extension
Component DBCacheContrib
Priority Normal
CurrentState Closed
Checkins DBCacheContrib:9d94a71ffcb2
ReleasedIn n/a
CheckinsOnBranches trunk
trunkCheckins DBCacheContrib:9d94a71ffcb2
Topic revision: r5 - 11 Dec 2013, 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