Modify

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#3952 closed defect (fixed)

wiki notification not sent if default_email_format: text/html

Reported by: acamac Owned by: doki_pen
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 acamac 6 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 6 years ago by anonymous

  • Cc sromanow@… added; anonymous removed

Changed 6 years ago by acamac

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 6 years ago by acamac

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 6 years ago by anonymous

  • Owner changed from ixokai to doki_pen
  • Priority changed from normal to highest
  • Severity changed from normal to critical

comment:4 Changed 6 years ago by doki_pen

  • Resolution set to fixed
  • Status changed from new to closed

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 6 years ago by acamac

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 6 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 6 years ago by doki_pen

I'll look at the patch today.

comment:8 Changed 6 years ago by anonymous

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

comment:9 Changed 6 years ago by anonymous

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

comment:10 Changed 5 years ago by doki_pen

  • Resolution set to fixed
  • Status changed from reopened to closed

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

comment:11 Changed 5 years ago by doki_pen

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

fixes #3952 merge -r7145

Add Comment

Modify Ticket

Action
as closed The owner will remain doki_pen.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.