Edgewall Software
Modify

Opened 20 years ago

Closed 20 years ago

Last modified 18 years ago

#742 closed defect (fixed)

Hitting preview when comment is empty breaks trac

Reported by: anonymous Owned by: Jonas Borgström
Priority: normal Milestone: 0.8
Component: wiki system Version: devel
Severity: normal Keywords:
Cc: jonas@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Steps to reproduce: select a ticket, select "reassign ticket to", enter a name, hit "preview" instead of submit.

Result:

 Trac detected an internal error:

  'NoneType' object has no attribute 'splitlines'

Traceback:

 Traceback (most recent call last):
  File "/usr/lib/python2.2/site-packages/trac/core.py", line 522, in cgi_start
    real_cgi_start()
  File "/usr/lib/python2.2/site-packages/trac/core.py", line 517, in real_cgi_start
    dispatch_request(path_info, args, req, env)
  File "/usr/lib/python2.2/site-packages/trac/core.py", line 432, in dispatch_request
    module.run()
  File "/usr/lib/python2.2/site-packages/trac/Module.py", line 45, in run
    self.render()
  File "/usr/lib/python2.2/site-packages/trac/Ticket.py", line 442, in render
    self.req.hdf, self.env))
  File "/usr/lib/python2.2/site-packages/trac/WikiFormatter.py", line 536, in wiki_to_html
    Formatter(hdf, env, absurls).format(wikitext, out)
  File "/usr/lib/python2.2/site-packages/trac/WikiFormatter.py", line 490, in format
    for line in text.splitlines():
AttributeError: 'NoneType' object has no attribute 'splitlines'

Attachments (0)

Change History (5)

comment:1 by anonymous, 20 years ago

Summary: Hitting preview button when reassigning a ticket breaks trackHitting preview when comment is empty breaks trac

On further investigation it seems that this will happen whenever the comment field is left empty and preview is selected. I've updated the summary to reflect this.

comment:2 by Matthew Good <matt-good.net>, 20 years ago

Component: ticket systemwiki
Milestone: 0.8
Version: 0.7.1devel

Well, I'm changing the version to "devel", as WikiFormatter.py isn't in milestone:0.7.1 and changing the component to wiki, as that's where the problem seems to originate from.

However, I'm using the trunk from [909] and I can't reproduce this error. I'm using mod_python, though so the problem could be cgi specific.

comment:3 by Jonas Borgström, 20 years ago

Status: newassigned

comment:4 by Jonas Borgström, 20 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [912].

comment:5 by Jonas Borgström, 20 years ago

Cc: jonas@… added

test

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.