Modify

Opened 7 years ago

Closed 7 years ago

#7807 closed defect (fixed)

Show error into "after registration form"

Reported by: Zefir Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: normal Keywords: user registration
Cc: Trac Release: 0.11

Description

After registration have this error:

TypeError: __call__() got an unexpected keyword argument 'user'

From log:

2010-10-09 19:22:40,074 Trac[main] ERROR: Internal Server Error:.
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 401, in process_request
    user=tag.b(req.args.get('user')))))
TypeError: __call__() got an unexpected keyword argument 'user'

I changed in acct_mgr/web_ui.py strings 399-401:

                    """Registration has been finished successfully.
                    You may login as user %(user)s now.""",
                    user=tag.b(req.args.get('user')))))

into:

                    "Registration has been finished successfully."
                    "You may login as user ", tag.b(req.args.get('user')), " now.")))

for fix this error.

Attachments (1)

web_ui.py.diff (478 bytes) - added by Zefir 7 years ago.
patch of this error

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by Zefir

Attachment: web_ui.py.diff added

patch of this error

comment:1 Changed 7 years ago by Steffen Hoffmann

Keywords: user added
Status: newassigned
Trac Release: 0.120.11

Thanks for taking your time for the report and suggested patch.

I confess, that I was not aware of this, since I'm already some steps ahead testing unreleased code. This would have been fixed by one of the next changesets introducing i18n support anyway, but we certainly should have stable code even in trunk at any time.

I'll apply your fix and revert message formatting later, since the suggested code is somewhat incompatible with i18n (see #6803). But you could hardly know this in advance.

comment:2 Changed 7 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [9276]) AccountManagerPlugin: Intermediate fix for registraiont confirmation message introduced in [9199], closes #7807.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.