Modify

Opened 5 years ago

Last modified 18 months ago

#6631 new defect

The setting `always_notify_author` is not respected initially for blogs

Reported by: rjollos Owned by: rjollos
Priority: high Component: AnnouncerPlugin
Severity: major Keywords: blog, FullBlogPlugin
Cc: Trac Release: 0.11

Description

Steps to reproduce:

  1. Create a new user and login to create a new blog post (see Log 1 below). User does not receive an email notification.
  2. Navigate to Preferences > Announcements. The blog subscription preferences are as shown in BlogSubscriptionInitialPreferences.png, below.
  3. Don't make any changes to the settings, just press Save changes.
  4. Create another blog post and you'll receive a notification this time.

I've reproduced these steps twice using two new usernames.

Log 1:

09:54:32 PM Trac[model] DEBUG: Saving new version 1 of blog post u'Post8' from author u'admin'
09:54:32 PM Trac[api] DEBUG: AnnouncementSystem found the following subscribers capable of handling 'blog, post created': StaticTicketSubscriber, BlogSubscriber
09:54:32 PM Trac[ticket_compat] DEBUG: StaticTicketSubscriber added 'ryano@physiosonics.com' because of rule: smtp_always_cc
09:54:32 PM Trac[subscriber] DEBUG: BlogSubscriber added 'admin (None)' for 'My Post Subscription'
09:54:32 PM Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions: [admin(not authenticated) via email], [ryano@physiosonics.com(not authenticated) via email]
09:54:32 PM Trac[email_distributor] DEBUG: EmailDistributor has found the following formats capable of handling 'email' of 'blog': text/plain
09:54:32 PM Trac[email_distributor] DEBUG: EmailDistributer format text/html not availablefor email blog, looking for an alternative
09:54:32 PM Trac[email_distributor] DEBUG: EmailDistributor found the address 'admin@physiosonics.com' for 'admin (not authenticated)' via: DefaultDomainEmailResolver
09:54:32 PM Trac[email_distributor] DEBUG: EmailDistributer format text/html not availablefor email blog, looking for an alternative
09:54:32 PM Trac[email_distributor] DEBUG: EmailDistributor found the address 'ryano@physiosonics.com' for 'None (not authenticated)' via: NoneType
09:54:32 PM Trac[api] DEBUG: AnnouncementSystem sent event in 0.01 seconds.

BlogSubscriptionInitialPreferences.png:


Log 2:

10:05:04 PM Trac[main] DEBUG: Dispatching <Request "POST u'/blog/create'">
10:05:04 PM Trac[web_ui] DEBUG: Blog debug: command=u'create', pagename=u'Post10', path_items=[u'create']
10:05:04 PM Trac[model] DEBUG: Saving new version 1 of blog post u'Post10' from author u'admin'
10:05:04 PM Trac[api] DEBUG: AnnouncementSystem found the following subscribers capable of handling 'blog, post created': StaticTicketSubscriber, BlogSubscriber
10:05:04 PM Trac[ticket_compat] DEBUG: StaticTicketSubscriber added 'ryano@physiosonics.com' because of rule: smtp_always_cc
10:05:04 PM Trac[subscriber] DEBUG: BlogSubscriber added 'admin (True)' for 'My Post Subscription'
10:05:04 PM Trac[api] DEBUG: AnnouncementSystem has found the following subscriptions: [ryano@physiosonics.com(not authenticated) via email], [admin(authenticated) via email]
10:05:04 PM Trac[email_distributor] DEBUG: EmailDistributor has found the following formats capable of handling 'email' of 'blog': text/plain
10:05:04 PM Trac[email_distributor] DEBUG: EmailDistributor determined the preferred format for 'admin (authenticated)' is: text/plain
10:05:04 PM Trac[email_distributor] DEBUG: EmailDistributor found the address 'admin@physiosonics.com' for 'admin (authenticated)' via: DefaultDomainEmailResolver
10:05:04 PM Trac[email_distributor] DEBUG: EmailDistributer format text/html not availablefor email blog, looking for an alternative
10:05:04 PM Trac[email_distributor] DEBUG: EmailDistributor found the address 'ryano@physiosonics.com' for 'None (not authenticated)' via: NoneType
10:05:04 PM Trac[email_distributor] DEBUG: EmailDistributor is sending event as '<generator object get_format_alternative at 0x225bfa0>' to: admin@physiosonics.com
10:05:06 PM Trac[email_distributor] DEBUG: EmailDistributor took 2.13 seconds to send.
10:05:06 PM Trac[api] DEBUG: AnnouncementSystem sent event in 2.19 seconds.
10:05:06 PM Trac[session] DEBUG: Retrieving session for ID u'admin'

Additional details: I'm running the t:TracStandalone development environment configued with authentication as described on t:TracStandalone#UsingAuthentication. The development environment is configured as described in t:TracDev/DevelopmentEnvironmentSetup.

All of the settings below were copied from the About page:

Trac:  	0.11.7stable-r9170
Python: 	2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1]
setuptools: 	0.6c11
SQLite: 	3.6.16
pysqlite: 	2.5.5
Genshi: 	0.6dev-r1092
Pygments: 	1.0
Subversion: 	1.6.5 (r38866)
FullBlog: 	0.1.1-r7225
jQuery:	1.2.6

[Announcer]

admit_domains  	
always_notify_component_owner 	true
always_notify_owner 	true
always_notify_reporter 	true
always_notify_updater 	true
ctxtnav_names 	Watch ThisUnwatch This
custom_cc_fields 	
default_email_format 	text/html
email_address_resolvers 	SpecifiedEmailResolver, SessionEmailResolver, DefaultDomainEmailResolver
email_sender 	SmtpEmailSender
ignore_cc_changes 	false
ignore_domains 	
joinable_groups 	
mime_encoding 	base64
sendmail_path 	sendmail
smtp_always_bcc 	
smtp_always_cc 	ryano@physiosonics.com
smtp_debuglevel 	
smtp_default_domain 	physiosonics.com
smtp_enabled 	true
smtp_from 	tracadmin@physiosonics.com
smtp_from_name 	Trac Admin
smtp_password 	XXXXXXX
smtp_port 	587
smtp_replyto 	tracadmin@physiosonics.com
smtp_server 	smtpx17.msoutlookonline.net
smtp_subject_prefix 	__default__
smtp_timeout 	10
smtp_to 	
smtp_user 	ryano@physiosonics.com
ticket_email_header_fields 	owner, reporter, milestone, priority, severity
ticket_email_subject 	Ticket #${ticket.id}: ${ticket['summary']} {% if action %}[${action}]{% end %}
ticket_subject_template 	$prefix #$ticket.id: $summary
use_public_cc 	false
use_short_addr 	false
use_threaded_delivery 	false
use_tls 	true
watchable_paths 	wiki/*,ticket/*
wiki_email_diff 	true
wiki_email_subject 	Page: ${page.name} ${action}

[fullblog-announcement]

always_notify_author  	enabled
blog_email_subject 	Blog: ${blog.name} ${action}

It also appears that I'm not receiving a notification through the address added in the smtp_always_cc parameter.

Attachments (1)

BlogSubscriptionInitialPreferences.png (15.2 KB) - added by rjollos 5 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 follow-up: Changed 5 years ago by rjollos

Also of potential interest is that the to: field of the email is always empty, though I imagine that this could have been done intentionally.

Changed 5 years ago by rjollos

comment:2 Changed 5 years ago by rjollos

It appears that the key difference between Log 1 and Log 2 is that the user admin is detected as authenticated in Log 2. I'm guessing that the user in the smtp_always_cc option is not notified because of the same issue as well.

comment:3 Changed 5 years ago by anonymous

  • Component changed from FullBlogAnnouncementsPlugin to AnnouncerPlugin
  • Owner changed from doki_pen to ixokai

comment:4 Changed 4 years ago by rjollos

  • Owner changed from ixokai to doki_pen

Changing owner since this was probably accidentally reassigned.

comment:5 Changed 4 years ago by doki_pen

  • Summary changed from The setting `always_notify_author` is not respected initially to The setting `always_notify_author` is not respected initially for blogs

comment:6 Changed 4 years ago by doki_pen

  • Priority changed from normal to high
  • Severity changed from normal to major

comment:7 Changed 4 years ago by rjollos

  • Keywords blog FullBlogPlugin added

comment:8 Changed 4 years ago by rjollos

  • Owner changed from doki_pen to rjollos

comment:9 in reply to: ↑ 1 Changed 18 months ago by hasienda

Replying to rjollos:

Also of potential interest is that the to: field of the email is always empty, though I imagine that this could have been done intentionally.

Unrelated.

comment:10 Changed 18 months ago by hasienda

I suggest that [9235] is relevant for this issue.

Hearing, that it is fixed by applying user preferences unchanged, makes me think, that current settings might have been parsed correctly for rendering the preferences panel, but not when checking subscriptions. And saving fixes it somehow, maybe an explicit subscription entry, that is respected in subsequent filter attempts.

Fact remains, that email addresses of authenticated users did not get emails due to not getting default preferences setting right on event processing.

Did you check this ever since? Mind that the plugin code has changed dramatically since your last update, especially core structures like subscription storage in the db and corresponding evaluation of subscriptions and filtering of events.

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.