Opened 7 years ago
Last modified 7 years ago
#13246 new defect
Notification emails are not sending
Reported by: | ntmlod | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | DiscussionPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 1.0 |
Description
Recently, our 1.0 Trac installation doesn't not send messages for new posts on our different forums.
I have tracked the events on Trac for the latest messages posted in the forums and found the same errors on the log file
2017-07-24 16:13:26,096 Trac[api] WARNING: AttributeError: 'NoneType' object has no attribute 'resource' 2017-07-24 16:13:26,098 Trac[api] WARNING: PermissionError: Insufficient privileges to perform this operation.
The notifications for forums used to work before until we got back in the same time with the default notification system for tickets instead of WorkflowNotificationPlugin so I think somehow it should be related.
Attachments (0)
Change History (5)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Sorry I wasn't probably clear.
The notification were working before for all resources (wiki, ticket and forum) and now only the forum notifications are missing.
WorkflowNotificationPlugin has been removed, egg file deleted and no specific configuration lines remains in trac.ini except I realized that I had forgotten to reset workflow
setting in [ticket]
section with the addition of TicketWorkflowNotifier
provider.
My bad, but I'm a bit pessimistic it will re-enable the forum notification.
comment:3 Changed 7 years ago by
The notifications work per my testing in an installation with no other plugins. If it was working for you, then stopped working, it would be helpful if you could narrow in on the plugin install or configuration change that resulted in discussion notifications no longer working.
comment:4 Changed 7 years ago by
Well now I'm pretty convinced the issue is related to AccountManager.
The last notification message goes back to when we have switched from HTTP authentication with Apache to the embedded authentication with this plugin via HtPasswdStore.
Before I was only using the API methods to make another plugin work and now it is fully enabled (0.5dev version).
[account-manager] account_changes_notify_addresses = xxxx allow_delete_account = true auth_init = true cookie_refresh_pct = 10 environ_auth_overwrite = true force_passwd_change = true generated_password_length = 8 htpasswd_file = ../auth/trac.passwd htpasswd_hash_type = sha512 login_attempt_max_count = 3 login_opt_list = false notify_actions = new,change,delete password_store = HtPasswdStore persistent_sessions = false refresh_passwd = true register_basic_token = I am fond of ocean modelling, please let me in. require_approval = false reset_password = true user_lock_max_time = 86400 user_lock_time = 3600 username_regexp = (?i)^[a-z0-9]{5,}$ verify_email = true ... [components] acct_mgr.admin.useradminpanel = disabled acct_mgr.db.sessionstore = disabled acct_mgr.htfile.htdigeststore = disabled acct_mgr.http.* = disabled acct_mgr.register.* = disabled acct_mgr.svnserve.svnservepasswordstore = disabled trac.web.auth.loginmodule = disabled
comment:5 Changed 7 years ago by
Last month, I recorded the events sequence when I post messages in the forum. So the bug seems to be related to a permission check for EMAIL_VIEW but the context has been lost meanwhile (void resource).
... 2017-08-08 17:27:31,363 Trac[api] DEBUG: Checking permission called with: action(DISCUSSION_VIEW), username(xxx), resource(<Resource u'discussion:forum/2'>), perm(<trac.perm.PermissionCache object at 0x40bfd20>) 2017-08-08 17:27:31,364 Trac[api] DEBUG: Checking permission called with: action(DISCUSSION_MODERATE), username(xxx), resource(None), perm(<trac.perm.PermissionCache object at 0x40997d0>) 2017-08-08 17:27:31,364 Trac[api] DEBUG: realm: discussion-core, action: post-add, format: None preview: False, submit: True 2017-08-08 17:27:31,364 Trac[api] DEBUG: Discussion actions: ['message-post-add'] 2017-08-08 17:27:31,364 Trac[api] DEBUG: req.args: {'body': u"...", 'author': u'xxx', 'submit': u'Submit changes', 'topic': u'20', '__FORM_TOKEN': u'ad3d6bb86a11634f1cf11492', 'message': u'22', 'discussion_action': u'post-add'} 2017-08-08 17:27:31,364 Trac[api] DEBUG: Checking permission called with: action(DISCUSSION_APPEND), username(xxx), resource(<Resource u'discussion:forum/2/topic/20, discussion:forum/2/topic/20/message/22'>), perm(<trac.perm.PermissionCache object at 0x40bff00>) 2017-08-08 17:27:31,380 Trac[api] DEBUG: message_change_listeners: [<tracdiscussion.notification.DiscussionEmailNotification object at 0x41654d0>] 2017-08-08 17:27:32,655 Trac[api] DEBUG: Checking permission called with: action(EMAIL_VIEW), username(xxx), resource(None), perm(<trac.perm.PermissionCache object at 0x40997d0>) 2017-08-08 17:27:32,656 Trac[api] WARNING: AttributeError: 'NoneType' object has no attribute 'resource' 2017-08-08 17:27:33,998 Trac[acronyms] DEBUG: Updating acronym database 2017-08-08 17:27:34,180 Trac[api] DEBUG: Discussion template: message-post-add.html data: {......................................................} 2017-08-08 17:27:34,181 Trac[core] DEBUG: Redirecting to /xxx/discussion/topic/20#message24 ... 2017-08-11 15:13:02,302 Trac[api] DEBUG: Checking permission called with: action(TAGS_VIEW), username(xxx), resource(<Resource 'tag'>), perm(<trac.perm.PermissionCache object at 0x47a5dc0>) 2017-08-11 15:13:02,302 Trac[api] DEBUG: Checking permission called with: action(DISCUSSION_VIEW), username(xxx), resource(<Resource u'discussion:forum/2'>), perm(<trac.perm.PermissionCache object at 0x47a5d20>) 2017-08-11 15:13:02,304 Trac[api] DEBUG: Checking permission called with: action(DISCUSSION_MODERATE), username(xxx), resource(None), perm(<trac.perm.PermissionCache object at 0x47817d0>) 2017-08-11 15:13:02,304 Trac[api] DEBUG: realm: discussion-core, action: post-add, format: None preview: False, submit: True 2017-08-11 15:13:02,304 Trac[api] DEBUG: Discussion actions: ['message-post-add'] 2017-08-11 15:13:02,304 Trac[api] DEBUG: req.args: {'body': u"...", 'author': u'xxx', 'submit': u'Submit changes', 'topic': u'20', '__FORM_TOKEN': u'ad3d6bb86a11634f1cf11492', 'message': u'26', 'discussion_action': u'post-add'} 2017-08-11 15:13:02,304 Trac[api] DEBUG: Checking permission called with: action(DISCUSSION_APPEND), username(xxx), resource(<Resource u'discussion:forum/2/topic/20, discussion:forum/2/topic/20/message/26'>), perm(<trac.perm.PermissionCache object at 0x47a5f00>) 2017-08-11 15:13:02,306 Trac[api] DEBUG: message_change_listeners: [<tracdiscussion.notification.DiscussionEmailNotification object at 0x4854190>] 2017-08-11 15:13:03,586 Trac[api] DEBUG: Checking permission called with: action(EMAIL_VIEW), username(xxx), resource(None), perm(<trac.perm.PermissionCache object at 0x47817d0>) 2017-08-11 15:13:03,587 Trac[api] WARNING: AttributeError: 'NoneType' object has no attribute 'resource' 2017-08-11 15:13:04,954 Trac[acronyms] DEBUG: Updating acronym database 2017-08-11 15:13:05,142 Trac[api] DEBUG: Discussion template: message-post-add.html data: {......................................................} 2017-08-11 15:13:05,142 Trac[core] DEBUG: Redirecting to /xxx/discussion/topic/20#message27 ...
Replying to ntmlod:
The sentence is a bit confusing to me, but if you think it stopped working after you installed a plugin and/or made a configuration change, it would help if you could narrow in on the culprit by temporarily disabling the plugin or reverting the configuration.