Opened 7 years ago

Closed 18 months ago

Last modified 18 months ago

#9206 closed defect (fixed)

[PATCH] AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords: i18n
Cc: Ryan J Ollos, Robert Corsaro Trac Release: 0.12


I'm working Japanese translations for the AnnouncerPlugin. While working, the following error occurs when visiting /prefs/announcer page.

2011-09-25 20:53:43,117 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/web/", line 522, in _dispatch_request
  File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/web/", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/home/jun66j5/venv/trac-0.12/lib/python2.4/site-packages/trac/prefs/", line 77, in process_request
    template, data = chosen_provider.render_preference_panel(req, panel_id)
  File "/home/jun66j5/src/trac/announcerplugin/announcer/", line 92, in render_preference_panel
    for name, label, template, data in self._get_boxes(req):
  File "/home/jun66j5/src/trac/announcerplugin/announcer/", line 86, in _get_boxes
    yield ((boxname, boxlabel) +
  File "/home/jun66j5/src/trac/announcerplugin/announcer/distributors/", line 254, in render_announcement_preference_box
AttributeError: 'XmppPreferencePanel' object has no attribute 'xmpp_format_setting'

XmppDistributor module has xmpp_format_setting attrubute, I think that it should be as the following patch.

  • announcer/distributors/

    diff --git a/announcer/distributors/ b/announcer/distributors/
    index 3cf9f3f..55ed788 100644
    a b class XmppPreferencePanel(Component): 
    251251        for realm in supported_realms:
    252252            name = 'xmpp_format_%s'%realm
    253253            settings[realm] = SubscriptionSetting(self.env, name,
    254                 self.xmpp_format_setting.default)
     254                XmppDistributor(self.env).xmpp_format_setting.default)
    255255        if req.method == "POST":
    256256            for realm, setting in settings.items():
    257257                name = 'xmpp_format_%s'%realm

Attachments (0)

Change History (7)

comment:1 Changed 7 years ago by Steffen Hoffmann

Cc: Robert Corsaro added; Steffen Hoffmann removed
Keywords: i18n added
Owner: changed from Robert Corsaro to Steffen Hoffmann

Would you be so kind as to assign any i18n stuff directly to me, please?

I'll have to resolve it anyway, since I did the initial implementation, and I'm on the way to improve it within next few weeks due to suspected Trac 0.11 backwards-compatibility issues, that I found in similar code for AccountManagerPlugin before. Thank you for taking care.

comment:2 Changed 6 years ago by Steffen Hoffmann

(In [12192]) TracAnnouncer: Correct class association for xmpp_format_setting, refs #9206.

Thanks to Jun Omae for testing, report with clear explanation and the patch itself. Sorry for taking so much time until applying your fix.

comment:3 in reply to:  1 Changed 6 years ago by Jun Omae

Replying to hasienda:

Would you be so kind as to assign any i18n stuff directly to me, please?

Ok. I do so from next time.

comment:4 Changed 6 years ago by Steffen Hoffmann

Cc: Ryan J Ollos added

#7828 has been closed as a duplicate.

comment:5 Changed 18 months ago by Ryan J Ollos

Owner: Steffen Hoffmann deleted

comment:6 Changed 18 months ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

comment:7 Changed 18 months ago by Ryan J Ollos

Owner: set to Jun Omae

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jun Omae.
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.