[Zope] "ZopeTime" not defined error?
Dave Lehman
davelehman@loewen.com
Wed, 31 Oct 2001 15:46:32 -0600
I'm having a problem with several DTML methods in my CMF site. When a
person is authenticated as "Member" (and not "manager") there is a problem
displaying some methods. But it only seems to happen if i've created a
"custom" version of that form (ie. taken the method from the "generic"
folder in portal_skins and made a version of it in my "custom" folder).
For example, I had made a custom version of the "logged_in" method to
display an extra message to the user. When the "logged_in" method gets
called right after they login, is displays a "global name 'ZopeTime' is not
defined" error message.
However, if I remove the custom "logged_in" method and let it use the one
in the "generic" folder, it works fine.
So now I have the identical "logged_in" method in both folders, but when it
uses it from "generic" it's fine, and when it uses it from "custom" it's
broken.
Any ideas? I posted this in the CMF list several days ago and didn't get
any response. Can anyone offer an idea of at least where I should start
looking to resolve this? Is there some permission missing from my "member"
security properties?
--dave
Here's the traceback:
Zope Error
Zope has encountered an error while publishing this resource.
Error Type: NameError
Error Value: global name 'ZopeTime' is not defined
----
Traceback (innermost last):
File /home/grifter/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line
223, in publish_module
File /home/grifter/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line
187, in publish
File /home/grifter/Zope-2.4.0-src/lib/python/Zope/__init__.py, line 226,
in zpublisher_exception_hook
(Object: LockableItem)
File /home/grifter/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line
171, in publish
File /home/grifter/Zope-2.4.0-src/lib/python/ZPublisher/mapply.py, line
160, in mapply
(Object: logged_in)
File /home/grifter/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line
112, in call_object
(Object: logged_in)
File /home/grifter/Zope-2.4.0-src/lib/python/OFS/DTMLMethod.py, line 194,
in __call__
(Object: logged_in)
File
/home/grifter/Zope-2.4.0-src/lib/python/DocumentTemplate/DT_String.py, line
544, in __call__
(Object: logged_in)
File /home/grifter/Zope-2.4.0-src/lib/python/DocumentTemplate/DT_With.py,
line 148, in render
(Object: portal_properties)
File /home/grifter/Zope-2.4.0-src/lib/python/DocumentTemplate/DT_Let.py,
line 148, in render
(Object: member="portal_membership.getAuthenticatedMember()")
File /home/grifter/Zope-2.4.0-src/lib/python/DocumentTemplate/DT_Util.py,
line 230, in eval
(Object: portal_registration.setProperties(login_time=ZopeTime()))
(Info: portal_registration)
File <string>, line 2, in f
(Object: guarded_getattr)
NameError: (see above)