Translated Template Fragments

Fixed in Petal-2.16. Bruno 2005-04-20

This was reported to mkdoc-dev on 23 Feb 2005 and the thread continued in March and it was discovered to be a Petal bug.

With MKDoc 1.4 you could have a directory like /bread-crumb-trail/ with a en.html and a tr.html file in it and on Turkish pages the tr.html template would be used and on English pages the en.html fragment would be used.

This is broken in MKDoc 1.6.

What happens is that the first language version to be accessed appears to be cached and then pages of either language just display the fragment in one language.

The only way to make things work for every request is to stop and start apache between requests…

Basically if I enable the Petal cache and do something like this:

my $a = new Petal (file => 'foo', base_dir => 'bar', language => 'en');
   $a = new Petal (file => 'foo', base_dir => 'bar', language => 'fr');

..Petal continues to use ‘en’ templates.

Either the memory or disk cache will cause the problem, which explains why Chris was having to both restart apache and delete the petal_cache_* files.

I don't really have the time to track this down just now (new baby etc..), so I've added some tests that demonstrate the problem to Petal CVS:

http://lists.webarch.co.uk/pipermail/mkdoc-commit/2005-March/000722.html

Document Links

reported to mkdoc-dev
reported to mkdoc-dev
http://lists.webarch.co.uk/pipermail/mkdoc-dev/2005-February/000254.html
the thread continued
the thread continued
http://lists.webarch.co.uk/pipermail/mkdoc-dev/2005-March/000261.html
Petal bug
[BUG] translated fragments get cached in last accessed language
http://lists.webarch.co.uk/pipermail/mkdoc-dev/2005-March/000269.html
This document was last modified on 2005-04-20 09:57:49.
MKDoc Ltd., 31 Psalter Lane, Sheffield, S11 8YL, UK.
Copyright © 2001-2005 MKDoc Ltd.