Item12673: DBCacheContrib fails to build cache for webs where a topic has section names containing period
Current State: Closed
Released In: n/a
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.
- 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
objects. A section name containing a dot is then misinterpreted as such.
Try this patch:
--- lib/Foswiki/Contrib/DBCacheContrib/Map.pm (revision 17114)
+++ lib/Foswiki/Contrib/DBCacheContrib/Map.pm (working copy)
@@ -240,7 +240,8 @@
$map->set( $field, $val );
- 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 );
I haven't run the unit tests yet. But I expect them to fail in other places now.
- 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!
- 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.
- 11 Dec 2013