I wanted to submit ticket but no success. I got following stack trace:

Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 314, in dispatch_request
    dispatcher.dispatch(req)
File "/usr/local/lib/python2.4/site-packages/trac/web/main.py", line 199, in dispatch
    resp = chosen_handler.process_request(req)
File "/usr/local/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 109, in process_request
    self._do_create(req, db)
File "/usr/local/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 170, in _do_create
    ticket.insert(db=db)
File "/usr/local/lib/python2.4/site-packages/trac/ticket/model.py", line 162, in insert
    [self[name] for name in std_fields] +
File "/usr/local/lib/python2.4/site-packages/trac/db/util.py", line 47, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
File "/usr/local/lib/python2.4/site-packages/trac/db/util.py", line 47, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
File "/usr/local/lib/python2.4/site-packages/pyPgSQL/PgSQL.py", line 3111, in execute
    raise OperationalError, msg
OperationalError: ERROR: null value in column "id" violates not-null constraint


The content of ticket I wanted to submit is:

------
Summary: Adding attachment causes charset encoding disappear from Content-Type header in first part

Full description:
Sending an e-mail without attachment generates correct header

{{{Content-Type: text/html; charset=utf-8}}}

But as soon as attachment is added, there's missing "charset=utf-8" in that header in very first part of message.

Hack that solved problem was the change of [http://dev.rubyonrails.org/browser/trunk/actionmailer/lib/action_mailer/base.rb#L376 this line] to one having content_type specified such as:

{{{
@parts.unshift Part.new(:content_type => content_type,
                        :charset => charset, :body => @body)
}}}

-----


--
Kamil Kukura
Czech Republic

_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to