Opened 5 years ago

Closed 2 years ago

#6242 closed defect (fixed)

`Delete Checked` crashes trying to delete ticket changes

Reported by: hju Owned by: coderanger
Priority: normal Component: TicketDeletePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


If you try to delete changes to a ticket by selecting delete at the specific change in the ticke:

  • all changes of this comment are selected
  • the comment itself is not selected

The delete checked button causes a crash

 Trac detected an internal error:

ValueError: too many values to unpack
Most recent call last:

    * File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/", line 423, in _dispatch_request
      Code fragment:
       418. try:
       419. if not env and env_error:
       420. raise HTTPInternalError(env_error)
       421. try:
       422. dispatcher = RequestDispatcher(env)
       423. dispatcher.dispatch(req)
       424. except RequestDone:
       425. pass
       426. resp = req._response or []
       428. except HTTPException, e:
      Local variables:
      Name	Value
      after 	[u' except RequestDone:', u' pass', u' resp = ...
      before 	[u' try:', u' if not env and env_error:', u' raise ...
      dispatcher 	<trac.web.main.RequestDispatcher object at 0xb67fe1ec>
      e 	<exceptions.ValueError instance at 0xb56105ec>
      env 	<trac.env.Environment object at 0xb6dbe26c>
      env_error 	None
      exc_info 	(<class exceptions.ValueError at 0xb6fc7b0c>, <exceptions.ValueError ...
      filename 	'/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/'
      frames 	[{'function': '_dispatch_request', 'lines_before': [u' try:', u' ...
      has_admin 	True
      line 	u' dispatcher.dispatch(req)'
      lineno 	422
      message 	u'ValueError: too many values to unpack'
      req 	<Request "POST u'/admin/ticket/comments/274'">
      resp 	[]
      tb 	<traceback object at 0xb561cbe4>
      tb_hide 	None
      traceback 	'Traceback (most recent call last):\n File ...
    * File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/web/", line 197, in dispatch
      Code fragment:
       192. req.args.get('__FORM_TOKEN') != req.form_token:
       193. raise HTTPBadRequest('Missing or invalid form token. '
       194. 'Do you have cookies enabled?')
       196. # Process the request and render the template
       197. resp = chosen_handler.process_request(req)
       198. if resp:
       199. if len(resp) == 2: # Clearsilver
       200. chrome.populate_hdf(req)
       201. template, content_type = \
       202. self._post_process_request(req, *resp)
      Local variables:
      Name	Value
      chosen_handler 	<trac.admin.web_ui.AdminModule object at 0xb67fe24c>
      chrome 	< object at 0xb68d1f0c>
      ctype 	'application/x-www-form-urlencoded'
      err 	(<class exceptions.ValueError at 0xb6fc7b0c>, <exceptions.ValueError ...
      handler 	<trac.admin.web_ui.AdminModule object at 0xb67fe24c>
      options 	{}
      req 	<Request "POST u'/admin/ticket/comments/274'">
      self 	<trac.web.main.RequestDispatcher object at 0xb67fe1ec>
    * File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/admin/", line 109, in process_request
      Code fragment:
       104. if not provider:
       105. raise HTTPNotFound(_('Unknown administration panel'))
       107. if hasattr(provider, 'render_admin_panel'):
       108. template, data = provider.render_admin_panel(req, cat_id, panel_id,
       109. path_info)
       111. else: # support for legacy WebAdmin panels
       112. data = {}
       113. cstmpl, ct = provider.process_admin_request(req, cat_id, panel_id,
       114. path_info)
      Local variables:
      Name	Value
      _panel_order 	<function _panel_order at 0xb5624ae4>
      cat_id 	u'ticket'
      panel_id 	u'comments'
      panels 	[('general', 'General', 'basics', 'Basic Settings'), ('general', ...
      path_info 	u'274'
      provider 	<ticketdelete.web_ui.TicketDeletePlugin object at 0xb67fe50c>
      providers 	{('ticket', 'comments'): <ticketdelete.web_ui.TicketDeletePlugin object at ...
      req 	<Request "POST u'/admin/ticket/comments/274'">
      self 	<trac.admin.web_ui.AdminModule object at 0xb67fe24c>
    * File "build/bdist.linux-i686/egg/ticketdelete/", line 86, in render_admin_panel
      Local variables:
      Name	Value
      cat 	u'ticket'
      data 	{'id': 0, 'href': '/ticket/admin/ticket/comments/274', 'changes': {}, ...
      deletions 	[[u'new', u'due', u'date', u'1258964319'], [u'comment', u'1258964319']]
      page 	u'comments'
      path_info 	u'274'
      req 	<Request "POST u'/admin/ticket/comments/274'">
      self 	<ticketdelete.web_ui.TicketDeletePlugin object at 0xb67fe50c>
      t 	<trac.ticket.model.Ticket object at 0xb6e6da0c>
      x 	u'new_due_date_1258964319'

But if you check Delete comment on the right side, it works!

It is a very helpful Plugin for Admins - and I love to use it.

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by rjollos

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

Should be fixed after [11790]. Please retest and reopen if you still have this issue.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.