Opened 14 years ago

Closed 12 years ago

Last modified 11 years ago

#5585 closed defect (duplicate)

Notifications not working, seems like the listeners are not being registered

Reported by: jon.stockdill@… Owned by: Radek Bartoň
Priority: normal Component: DiscussionPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


I updated my tracdiscussion to:

Repository Root:
Repository UUID: 7322e99d-02ea-0310-aa39-e9a107903beb
Revision: 6310
Node Kind: directory
Schedule: normal
Last Changed Author: Blackhex
Last Changed Rev: 6310
Last Changed Date: 2009-07-29 07:32:55 -0400 (Wed, 29 Jul 2009)

The notifications are still not working, seems like the listeners are not being registered.

I added:

self.log.error('self.message_change_listeners: ' + str(self.message_change_listeners))

to line 1167 of and it prints: 2009-07-29 09:11:35,217 Trac[api] ERROR: self.message_change_listeners: []

I read but could not figure out how to get it registered. Is it a configuration issue or something else?

Let me know if there is anything I can do to help. I love the discussions and am excited about the notifications support.

Attachments (0)

Change History (10)

comment:1 Changed 14 years ago by anonymous

Owner: changed from Radek Bartoň to anonymous
Status: newassigned

Have you enabled notification component?

tracdiscussion.notification.* = enabled

comment:2 Changed 14 years ago by Radek Bartoň

Owner: changed from anonymous to Radek Bartoň
Status: assignednew

comment:3 Changed 14 years ago by Radek Bartoň

Status: newassigned

comment:4 Changed 14 years ago by jon.stockdill@…

Thanks! That helped. That wired it... and makes total sense after reading the component documentation. The log now says:

self.message_change_listeners: [<tracdiscussion.notification.DiscussionEmailNotification object at 0x8f26a0c>]

And I am getting the following error and stack trace now:

NameError: global name 'DiscussionApi' is not defined
File "/cust/Trac-", line 432, in _dispatch_request
File "/cust/Trac-", line 204, in dispatch
  resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/tracdiscussion/", line 108, in process_requestFile "build/bdist.linux-i686/egg/tracdiscussion/", line 225, in process_discussionFile "build/bdist.linux-i686/egg/tracdiscussion/", line 1169, in _do_actionsFile "build/bdist.linux-i686/egg/tracdiscussion/", line 243, in message_created

comment:5 Changed 14 years ago by Radek Bartoň

Oh god, not aggain :-). What is your installation procedure? Try to install the plugin from scratch. Check the DEBUG log if all components are loading... Otherwise I don't know... This kind of error shouldn't happen.

comment:6 Changed 14 years ago by jon.stockdill@…

I had a few eggs in site-packages, I removed all of them, built the egg from the HEAD of the 0.11 branch and restarted trac.

Here are the debug logs:

2009-07-29 11:17:26,021 Trac[loader] DEBUG: Loading TracDiscussion.spamfilter from /cu
2009-07-29 11:17:26,034 Trac[loader] DEBUG: Skipping "TracDiscussion.spamfilter = trac
discussion.spamfilter [spamfilter]": ("TracSpamFilter" not found)
2009-07-29 11:17:26,035 Trac[loader] DEBUG: Loading TracDiscussion.api from /cust/Pyth
2009-07-29 11:17:26,040 Trac[loader] DEBUG: Loading TracDiscussion.init from /cust/Pyt
2009-07-29 11:17:26,041 Trac[loader] DEBUG: Loading TracDiscussion.core from /cust/Pyt
2009-07-29 11:17:26,042 Trac[loader] DEBUG: Loading from /cust/P
2009-07-29 11:17:26,044 Trac[loader] DEBUG: Loading TracDiscussion.timeline from /cust
2009-07-29 11:17:26,045 Trac[loader] DEBUG: Loading from /cust/Pyt
2009-07-29 11:17:26,047 Trac[loader] DEBUG: Loading TracDiscussion.admin from /cust/Py
2009-07-29 11:17:26,048 Trac[loader] DEBUG: Loading TracDiscussion.notification from /


tracdiscussion.notification.DiscussionNotifyEmail = enabled

doesn't load the DiscussionEmailNotification, so there are no listeners.

Changing it from:

tracdiscussion.notification.* = enabled


tracdiscussion.notification.DiscussionEmailNotification = enabled

Still generates the error:

NameError: global name 'DiscussionApi' is not defined

which makes sense.

My trac version is

I appreciate the help and will continue to try and figure it out.

comment:7 in reply to:  6 Changed 14 years ago by anonymous

I appreciate the help and will continue to try and figure it out.

No, I appreciate your effort to investigate the problem.

Honestly, I really don't know where is the problem. Unforunatelly, I can't reproduce it until I know what server configuration are you using (OS, tracd, mod_python, Apache+CGI, Python version, etc.)? Just few shoots in the dark:

  • Try to change line 17 in to from tracdiscussion.api import DiscussionApi
  • Check content of plugin's egg, especially presence and content of file (rename it to zip).
  • Change line 204 in to api = api = DiscussionApi(self, context.req)
  • Check or add to trac.ini tracdiscussion.api.DiscussionApi = enabled.

I'm not sure if anything of this may help, I'll ask on #trac IRC channel at otherwise.

comment:8 Changed 13 years ago by Radek Bartoň


comment:9 Changed 12 years ago by Ryan J Ollos

Is it possible you have the AnnouncerPlugin installed?

comment:10 Changed 12 years ago by Radek Bartoň

Resolution: duplicate
Status: assignedclosed

In that case it's duplicate of #7636.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.