#4067 closed defect (worksforme)
Comments not listed in notification email
Reported by: | anonymous | Owned by: | Jonas Borgström |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 0.10 |
Severity: | normal | Keywords: | notification |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
After upgrading from 0.9.5 to tract 0.10, Comments are now being omitted from emails. Since our team routinely keeps tab on development via email notification, this is a serious inconvenience.
Attachments (1)
Change History (21)
comment:1 by , 18 years ago
Keywords: | notification added |
---|---|
Milestone: | 0.10.1 |
comment:2 by , 18 years ago
[notification] smtp_enabled = true smtp_replyto = <omitted> smtp_always_cc = <omitted> smtp_server = localhost smtp_from = <omitted> always_notify_reporter = false
There are lots of ERRORS in the log file, but a lot of them are pretty old. Deleting the log file and will post again if I find some fresh errors.
comment:3 by , 18 years ago
PS. In case this wasn't clear, We ARE getting email notifications fine, but the most interesting part, the comments, is simply not included in the email. Only the status changes and header/footer information are there.
comment:4 by , 18 years ago
After clearing out the old log file, and setting the log level in trac.ini to INFO, I see no further ERRORs reported in the log file. (In fact, I don't even see any INFO, although trac recreated the log file automatically).
Comments still missing from emails.
comment:5 by , 18 years ago
Set Log level to DEBUG, just to make sure the log is working and confirmed that DEBUG statements are being written. There are no ERROR statements, and our team is still receiving notification emails with no comment listed. I guess this means I'll have to move back to trac 0.9.5, since emails with comments are a critical part of our workflow. Are downgrades from 0.10 to 0.9.5 feasible?
comment:6 by , 18 years ago
Well, e-mail notifications work fine in 0.10, so I see no good reason to downgrade.
It'll be certainly less painful to figure out what's really going on… Maybe an e-mail encoding issue? Check TracNotification and TracIni#notification-section.
Also helpful would be to insert a few print
statements in trac/ticket/notification.py, e.g.
-
trac/ticket/notification.py
83 83 self.hdf.set_unescaped('ticket.change.comment', 84 84 wrap(change['comment'], self.COLS, 85 85 ' ', ' ', CRLF)) 86 print 'ticket.change.comment is', self.hdf['ticket.change.comment'] 86 87 link += '#comment:%s' % str(change.get('cnum', '')) 87 88 for field, values in change['fields'].iteritems(): 88 89 old = values['old']
Also, check your templates/ticket_notify_email.cs, to see if it matches the standard one (source:tags/trac-0.10/templates/ticket_notify_email.cs) and uses the <?cs var:ticket.change.comment ?>
line.
Maybe there's an old customized template in your $TRAC_ENV/templates folder?
comment:7 by , 18 years ago
You can also try to use a different MIME encoding scheme, see mime_encoding
option in TracNotification
You can also post the SMTP source here ("View source" or a similar menu item in your email client). Do not forget to enclose the SMTP source in {{{ }}} brackets or attach it to the ticket.
comment:8 by , 18 years ago
Thanks for the feedback. My [notification] section from trac.ini is listed above (poorly formatted, my bad). Since this hasn't changed during our upgrade, and since it's pretty simple, not sure what could be going wrong there. Most likely culprit is something to do with the mime encoding, as you suggest.
I'll try to explore this in more depth using the suggestions above. Since we currently don't do anything special with this setting, (we don't even use the setting in trac.ini), I'll have to dig into the issue a bit to understand the options trac presents.
Has mime encoding handling changed significantly since 0.9.5?
comment:9 by , 18 years ago
Added the suggest print statement, but I'm not sure in which log it's supposed to appear. Didn't see it in apache logs, syslog, or the trac logs for the project.
Attaching source from a notification email in which the test comment 'comment5' is missing. One thing I notice about the email is that the Trac Mailer claims to be 0.9.5, which could be a clue that my install didn't work correctly. One thing I also notice is that my AboutTrac page still says 0.9.5, although the rest of the Wiki correctly has 0.10 documentation. I'm starting to think something isn't quite kosher with my install. I inherited maintenance of the system from a departed employee, so it's very possible that I munged the install, though I tried to follow the Upgrade Howto carefully.
Attaching 'email-source.txt'
by , 18 years ago
Attachment: | email-source.txt added |
---|
follow-up: 12 comment:11 by , 18 years ago
Still no progress here. Does anyone have any idea why the AboutTrac page would still show 0.9.5 after upgrade to 0.10? Is there some way I can check the installed version of Trac?
comment:12 by , 18 years ago
comment:13 by , 18 years ago
Sure, renamed the trac folder in /usr/lib/python2.3/site-packages, then ran the install script.
Did the same with the docs, though they were less straightforward. The install installs the docs at /usr/share/trac, but I found a second copy of the docs at /usr/local/share which seemed to be the one used by trac. Copying the installed docs to the second location resulted in the online docs being updated correctly. Since I didn't do the original install, I'm not sure why the docs used by trac are at a different location than those installed by the installer.
OS = debian sarge
follow-up: 16 comment:14 by , 18 years ago
follow-up: 17 comment:15 by , 18 years ago
Trying to verify that I do indeed have 0.10 installed, I checked the Revision Log page. It does seem to have 0.10 functionality, allowing me the option to diff any two revision in a branch (unfortunately, it doesn't work, but that's another issue i guess).
So I'm still at a loss as to why AboutTrac, and the Mailer listed in the email both reference trac 0.9.5.
Possibly significant: When I attempted to update our db, I received only a message that no db updates were necessary. I interpreted this to mean that the db schema hadn't changed between 0.9.5 and 0.10, but maybe something else is going on?
comment:16 by , 18 years ago
Replying to anonymous:
Where does the AboutTrac page come from, if not from the installed docs for 0.10? I'm still puzzled why the AboutTrac page is out of sync with the rest of the docs.
About page is not a wiki page, it is a dynamically generated page, from a template file (about.cs
) and internal variables. It is not a static page as just another wiki page.
If the version does not match your installation, you have an issue w/ your installation (i.e. wrong files are used, old files have not been removed).
It is not about clearing up the doc directory, but clearing up all the previous trac installation (which include the template directory but even most important: the python files), as documented in TracUpgrade#UpdatetheTracCode.
comment:17 by , 18 years ago
Replying to anonymous:
Possibly significant: When I attempted to update our db, I received only a message that no db updates were necessary. I interpreted this to mean that the db schema hadn't changed between 0.9.5 and 0.10, but maybe something else is going on?
It seems that your upgrade has been run with some of the older python Trac files…
comment:18 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Eureka! Figured this out. Of course you are right, I messed up the install. The install script installs files to
/usr/lib/python2.3/site-packages/trac
However, our website actually uses files from
/usr/local/lib/python2.3/site-packages/trac
which still had the files from trac 0.9.5
Once I copied the files created by the installer to the /usr/local location and reran the trac-admin upgrade, all worked as it should.
Thanks for your patience and help in getting this figured out! Long live Trac!
comment:19 by , 18 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
reopen to change to correct resolution.
comment:20 by , 18 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
This was an install issue.
Can you provide the
[notification]
section of your trac.ini file, and check your log file to see if any notification error is reported ?I'm using 0.10 and the comment notification seems to work fine.