Ticket #5568 (closed Bug: fixed)

Opened 10 years ago

Last modified 10 years ago

Error with lost password functionality/password reset in setup

Reported by: lucasmarshall Owned by: wichert
Priority: critical Milestone: 2.5
Component: Users/Groups Version:
Keywords: Cc:


I found that when a user resets their password or an admin resets a user's password, the following exception is raised (traceback included):

Traceback (innermost last):
  Module ZPublisher.Publish, line 115, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 41, in call_object
  Module Products.CMFCore.FSPythonScript, line 108, in __call__
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPythonScript, line 164, in _exec
  Module None, line 4, in mail_password
   - <FSPythonScript at /infowest/mail_password>
   - Line 4
  Module Products.CMFPlone.RegistrationTool, line 174, in mailPassword
  Module Products.CMFDefault.RegistrationTool, line 149, in mailPassword
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 195, in _exec
  Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
  Module Products.PageTemplates.PageTemplate, line 104, in pt_render
   - <FSPageTemplate at /infowest/mail_password_template used for /infowest/portal_registration>
  Module TAL.TALInterpreter, line 238, in __call__
  Module TAL.TALInterpreter, line 281, in interpret
  Module TAL.TALInterpreter, line 507, in do_setLocal_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: file:CMFPlone/skins/plone_templates/mail_password_template.pt
   - Line 1, Column 0
   - Expression: standard:'context/@@plone/toLocalizedTime'
   - Names:
      {'container': <PloneSite at /infowest>,
       'context': <RegistrationTool at /infowest/portal_registration>,
       'default': <Products.PageTemplates.TALES.Default instance at 0x8f0c1ac>,
       'here': <RegistrationTool at /infowest/portal_registration>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at 0xa654eac>,
       'modules': <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at 0x8f2cdac>,
       'nothing': None,
       'options': {'args': (<RegistrationTool at /infowest/portal_registration>,
                            <HTTPRequest, URL=http://www.infowest.com/mail_password>),
                   'member': <MemberData at /infowest/portal_memberdata/karlerik used for /infowest/acl_users>,
                   'password': None},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at 0xa654eac>,
       'request': <HTTPRequest, URL=http://www.infowest.com/mail_password>,
       'root': <Application at >,
       'template': <FSPageTemplate at /infowest/mail_password_template used for /infowest/portal_registration>,
       'traverse_subpath': [],
       'user': <SpecialUser 'Anonymous User'>}
  Module Products.PageTemplates.Expressions, line 185, in __call__
  Module Products.PageTemplates.Expressions, line 180, in _eval
  Module Products.PageTemplates.Expressions, line 85, in render
TypeError: toLocalizedTime() takes at least 2 arguments (1 given)

Altering line 4 of mail_password_template.pt:

                  toLocalizedTime context/@@plone/toLocalizedTime"

to read:

                  toLocalizedTime nocall:context/@@plone/toLocalizedTime"

Fixes the problem. This is probably something that should be included in the 2.5 final. :)

Change History

comment:1 Changed 10 years ago by lucasmarshall

  • Priority changed from minor to critical
  • Milestone changed from 2.5.x to 2.5

comment:2 Changed 10 years ago by alecm

  • Status changed from new to closed
  • Resolution set to fixed

(In [10044]) Added missing nocall: for toLocalizedTime in mail_password_template.pt. Fixes #5568

Note: See TracTickets for help on using tickets.