Re: ZopeTime() Error
First of all, please use the zope@zope.org mailinglist for Zope related questions, the zope-web list os for Zope.org (website) issues only. On Tue, May 07, 2002 at 02:32:17PM -0600, Mike Tran wrote:
I can call the <dtml-var ZopeTime()> variable from Zope's root folder, but i cannot access this variable from anyother sub folders. Zope's traceback is telling me that the 'ZopeTime' variable is not defined globally. Can anyone show me how to fix this please? thanx.
Please use <dtml-var ZopeTime> or <dtml-var name="ZopeTime"> (equivalent) or use <dtml-var "ZopeTime()"> or <dtml-var expr="ZopeTime()"> (again, both equivalent). <dtml-var ZopeTime()> looks up an object with the full name "ZopeTime()" (including the parens) which does not exist. See the Zope Book on Zope.org, chapters on DTML for more info on the difference. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
I can call the <dtml-var ZopeTime()> variable from Zope's root folder, but i cannot access this variable from anyother sub folders.
Sorry, that's was a typos on my prior message. I've used <dtml-var "ZopeTime()"> and tried all your suggestions Martijn. <dtml-var "ZopeTime()"> works from Zope's root folder. I can see the date and time it serves up (2002/05/07 15:46:59.1966 GMT-6). I just can't use that variable on any other sub folders. It is possibly a permission problem? If it was a permission problem then Zope would have told me right? On Tue 07 May 02 15:09, you wrote:
First of all, please use the zope@zope.org mailinglist for Zope related questions, the zope-web list os for Zope.org (website) issues only.
On Tue, May 07, 2002 at 02:32:17PM -0600, Mike Tran wrote:
I can call the <dtml-var ZopeTime()> variable from Zope's root folder, but i cannot access this variable from anyother sub folders. Zope's traceback is telling me that the 'ZopeTime' variable is not defined globally. Can anyone show me how to fix this please? thanx.
Please use <dtml-var ZopeTime> or <dtml-var name="ZopeTime"> (equivalent) or use <dtml-var "ZopeTime()"> or <dtml-var expr="ZopeTime()"> (again, both equivalent). <dtml-var ZopeTime()> looks up an object with the full name "ZopeTime()" (including the parens) which does not exist.
See the Zope Book on Zope.org, chapters on DTML for more info on the difference.
-- Mike Doanh Tran Shuffle Master Gaming Inc.
On Tue, May 07, 2002 at 03:53:22PM -0600, Mike Tran wrote:
I can call the <dtml-var ZopeTime()> variable from Zope's root folder, but i cannot access this variable from anyother sub folders.
Sorry, that's was a typos on my prior message. I've used <dtml-var "ZopeTime()"> and tried all your suggestions Martijn. <dtml-var "ZopeTime()"> works from Zope's root folder. I can see the date and time it serves up (2002/05/07 15:46:59.1966 GMT-6). I just can't use that variable on any other sub folders. It is possibly a permission problem? If it was a permission problem then Zope would have told me right?
I cannot reproduce this on my Zope 2.5 checkout, it works for me using the name="" and expr="" versions (or with and withoutquotes), iin the root and elsewhere, with the test DTML Method copied or acquired. If it was a permissions problem, you would indeed get a authentication box. You said it was a Not Found error. Are you absolutely sure this is the problem, and not a type on the name of an object? Try and isolate the problem by creating a simple method. If you can reproduce this on a clean install of Zope, you probably have found a bug somewhere. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
participants (2)
-
Martijn Pieters -
Mike Tran