• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Don't know whether this qualifies as a bug, but I just spent hours debugging the following:

I am using a hidden file as cache (named .cache), and when moving code over to Dakar I wanted to use TWiki::Func::readTopicText instead of getting directly at the file.

Turns out that TWiki::normalizeWebTopicName (which is called on the way) interprets the dot as a separator between web and topic, and thus rewrites this file to be in Main and takes out the dot, even though a web was passed into the function.

This is somewhat borderline as spec is concerned. While the spec says that

Input:                      Return:
  ( 'Web1', 'Web2.Topic' )    ( 'Web2', 'Topic' )
this leaves the question open as to what is happening when Web2 is blank. It is not given that this should be rewritten to Main.
You are quite right to avoid direct reads from the data dir; but readTopicText should only be used for reading topics (hence the name). If you want to store metafiles such as caches, I would recommend that you use getWorkArea and write your own files there. That way you won't clash when another plugin also wants to us the name .cache.

Discarded.

CC

ItemTemplate
Summary Cannot read hidden files with TWiki::Func::readTopicText
ReportedBy TWiki:Main.ThomasWeigert
Codebase 4.0.0, 4.0.2, 4.0.4, 4.0.1, 4.0.3
SVN Range Thu, 29 Jun 2006 build 10750
AppliesTo Engine
Component

Priority Normal
CurrentState No Action Required
WaitingFor

Checkins

TargetRelease n/a
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2006-07-09 - CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback