#7474 closed defect (wontfix)
Update the HTML notification patch for Trac 0.12 release
Reported by: | Ivan | Owned by: | akarzim |
---|---|---|---|
Priority: | normal | Component: | TracHtmlNotificationPatch |
Severity: | normal | Keywords: | Trac 0.12 notification |
Cc: | Jun Omae | Trac Release: | 0.12 |
Description (last modified by )
The patch needs to be updated for Trac 0.12.
Attachments (3)
Change History (20)
Changed 14 years ago by
Attachment: | ticket_notify_email_Trac-0.12.patch added |
---|
comment:1 Changed 14 years ago by
Summary: | Update the HTML notification path for Trac 0.12 release → Update the HTML notification patch for Trac 0.12 release |
---|---|
Trac Release: | 0.11 → 0.12 |
Changed 14 years ago by
Attachment: | Trac0.12-HtmlNotificationFiles.zip added |
---|
HTML notification patch for Trac 0.12 files
comment:2 Changed 14 years ago by
I also added small change for Author`s name prefix in From e-mail field instead of static label defined by 'smtp_from_name' in Trac config. See Trac/notification.py file.
--- D:/Install/Trac/Trac-12.0/Plugins/Notification/org/Trac/notification.py Wed Aug 11 14:26:44 2010 +++ D:/Install/Trac/Trac-12.0/Plugins/Notification/new/Trac/notification.py Wed Aug 11 14:20:58 2010 @@ -309,7 +309,10 @@ if not self.config.getbool('notification', 'smtp_enabled'): return self.from_email = self.config['notification'].get('smtp_from') - self.from_name = self.config['notification'].get('smtp_from_name') + #DNK I prefer to have "Author`s name" prefix in the From e-mail field instead of static label defined by 'smtp_from_name' in Trac config + #self.from_name = self.config['notification'].get('smtp_from_name') + self.from_name = self.data['change']['author'] + ' ' + self.config['notification'].get('smtp_from_name') + #DNK end self.replyto_email = self.config['notification'].get('smtp_replyto') self.from_email = self.from_email or self.replyto_email if not self.from_email and not self.replyto_email:
comment:3 follow-up: 4 Changed 14 years ago by
Type: | enhancement → defect |
---|
i still can't get this to work... still receiving notification messages in plain text...
comment:4 Changed 14 years ago by
Replying to larachan:
i still can't get this to work... still receiving notification messages in plain text...
I am sorry, patch file is not full, it is still needs patch for ..\Trac0.12-HtmlNotificationFiles\new\Trac\ticket\notification.py
. You can use zip file to do correct patch.
comment:5 follow-up: 9 Changed 14 years ago by
This is a very fine patch.
However, the comments are allowed to include wiki formatting, which isn't applied when it is sent.
How would it be possible to add this functionality ?
comment:6 Changed 14 years ago by
Description: | modified (diff) |
---|
comment:7 follow-up: 8 Changed 14 years ago by
I replaced the my files(notification.py and ticket_notify_email.txt ) with your patch. And then I restarted web server but the patch isn't applied. How can I solve this problem? Please let me know. Please Help~
comment:8 Changed 14 years ago by
Replying to jypark@inka.co.kr:
I replaced the my files(notification.py and ticket_notify_email.txt ) with your patch. And then I restarted web server but the patch isn't applied. How can I solve this problem? Please let me know. Please Help~
I mean I still receive notification messages in plain text.
I guess something wrong in the cache.
The cache where is in my path(D:\trac\.egg-cache), in whitch there are old ticket_notify_email.txt file.
(for example in my case : D:\trac\.egg-cache\trac-0.12.1-py2.5-win32.egg-tmp\trac\ticket\templates\ticket_notify_email.txt)
comment:9 Changed 14 years ago by
Replying to christophe@ravelsoft.com:
This is a very fine patch.
However, the comments are allowed to include wiki formatting, which isn't applied when it is sent.
How would it be possible to add this functionality ?
You might want to look at the patch on #5922 to have comment in html format.
comment:10 Changed 13 years ago by
I'm having the same problem mentioned by others. I applied the patch (for trac 0.11.4) and restarted the server, but I still get the same plain text email as before.
Any idea what is wrong?
This is on a Linux machine, hosted with a commercial provider (DreamHost). I had them restart the apache server. I believe they really did it. I received this email from them:
I've restarted the apache servers per your request. Here's the status:
Current Time: Tuesday, 15-Mar-2011 14:43:05 PDT Restart Time: Tuesday, 15-Mar-2011 14:42:58 PDT Server uptime: 7 seconds
Any help or ideas would be appreciated!
comment:11 Changed 13 years ago by
We are working on TRAC 0.12.2. I changed the files from our system with the files from the zip-file. Then I restart the apache and create a new ticket. When I send the ticket I get a warning in a yellow box sounds like: "Ticket was created but there was an error when sending the notification with :'author'. This is from the trac error-log: Trac[web_ui] ERROR: Failure sending notification on creation of ticket #12: KeyError: 'author' Any ideas?
comment:12 Changed 13 years ago by
Martin, you should undo my change in http://trac-hacks.org/ticket/7474#comment:2
self.from_name = self.data['change']['author']...
In Trac 0.12 there is not 'auhtor' when initial ticket created. Must be:
self.from_name = self.config['notification'].get('smtp_from_name')
comment:13 Changed 13 years ago by
There is also patch for Trac 0.13, see Ticket #8360 to support Author name in From.
comment:14 Changed 13 years ago by
I had to add the following on line 420 of trac/notification.py:
headers['Content-Type'] = 'text/html; charset="utf-8"'
I'm running 0.12 and this was NOT in the zip file I downloaded that's attached to this ticket.
comment:15 Changed 13 years ago by
sorry, that should be:
headers['Content-Type'] = 'text/html; charset="utf-8"'
comment:16 Changed 11 years ago by
Cc: | Jun Omae added; anonymous removed |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
I think we can close this and direct users to the TracHtmlNotificationPlugin. jun66j5: does that seem correct to you?
HTML notification patch for Trac 0.12