Modify

Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#3952 closed defect (fixed)

wiki notification not sent if default_email_format: text/html

Reported by: Aaron Camac Owned by: Robert Corsaro
Priority: highest Component: AnnouncerPlugin
Severity: critical Keywords:
Cc: sromanow@… Trac Release: 0.11

Description

This situation produces

2008-10-20 09:35:17,641 Trac[api] ERROR: AnnouncementSystem failed.
Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/announcerplugin/api.py", line 377, in _real_send
  File "build/bdist.linux-i686/egg/announcerplugin/distributors/email_distributor.py", line 195, in distribute
KeyError: u'text/html'

Maybe you were planning on handling this with

def get_format_alternative(self, transport, realm, style):

Or maybe the plan is to just implement a html template in the near future... I think that's what I might do to get around this for now.

Attachments (1)

distributor.diff (3.2 KB) - added by Aaron Camac 16 years ago.
This is that change I made... probably would have been less work if I had just created a simple html template for the wiki. Anyway this change does allow for the graceful degradation of the format.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 16 years ago by anonymous

Cc: sromanow@… added; anonymous removed

Changed 16 years ago by Aaron Camac

Attachment: distributor.diff added

This is that change I made... probably would have been less work if I had just created a simple html template for the wiki. Anyway this change does allow for the graceful degradation of the format.

comment:2 Changed 16 years ago by Aaron Camac

Must have something odd in the format of my diff. Click on the Original Format at the bottom of the attachment to see the file.

comment:3 Changed 16 years ago by anonymous

Owner: changed from Stephen Hansen to Robert Corsaro
Priority: normalhighest
Severity: normalcritical

comment:4 Changed 16 years ago by Robert Corsaro

Resolution: fixed
Status: newclosed

It doesn't make sense to set the default format to a template that doesn't exist. IMHO, it should result in an error. If you create an html template, please contribute it.

comment:5 Changed 16 years ago by Aaron Camac

Resolution: fixed
Status: closedreopened

So you are saying that formatters should support all possible formats. Ok, I won't argue with that.

However, I state the that problem stands... you cannot specify default_email_format = text/html in current plugin and have wiki notifications work without the user overriding the default.

It's just that the posted implementation is just not the desired one.

comment:6 Changed 16 years ago by anonymous

Ah, I see. You can't specify default format separately for tickets and wiki. So if you want html for tickets, you lose wiki.

comment:7 Changed 16 years ago by Robert Corsaro

I'll look at the patch today.

comment:8 Changed 16 years ago by anonymous

and also the text template encodes urls strangely with <url:http:/sometihng.com>

comment:9 Changed 16 years ago by anonymous

while http://something.com would be noticed by most browsers, and mail clients as clickable url.

comment:10 Changed 15 years ago by Robert Corsaro

Resolution: fixed
Status: reopenedclosed

(In [7145]) fallback to text/plain if format can't be found fixes #3952

comment:11 Changed 15 years ago by Robert Corsaro

(In [7573]) fallback to text/plain if format can't be found

fixes #3952 merge -r7145

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Robert Corsaro.
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.