Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#5509 closed defect (duplicate)

TicketQuery crashes Trac wiki

Reported by: rocky@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I was trying to show a single ticket number and summary in the wiki (so the summary is pulled from the ticket as opposed to manually entering it as display link text). I tried using TicketQuery by specifying a specific ticket (so the result would always be a single ticket). But trying to use ticket as a ticket field name causes an internal error. Is it possible to query the ticket number so as to avoid the error?

I used the following TicketQuery macro:

[[TicketQuery(ticket=94)]]

When I pressed submit, I received the following error

Trac detected an internal error:
ProgrammingError: current transaction is aborted, commands ignored until
end of transaction block

When I previewed it on the Trac demo site, I received the following error:

Error: Macro TicketQuery(ticket=1) failed
no such column: t.ticket

When I tried to enter this ticket on Edgewall's trac system, I forgot to escape the TicketQuery and got the following Python traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 177, in process_request
    milestone = Milestone(self.env, option, db=db)
  File "/usr/lib/python2.4/site-packages/trac/ticket/model.py", line 552, in __init__
    self._fetch(name, db)
  File "/usr/lib/python2.4/site-packages/trac/ticket/model.py", line 564, in _fetch
    "FROM milestone WHERE name=%s", (name,))
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: current transaction is aborted, commands ignored until end of transaction block

Attachments (0)

Change History (2)

comment:1 by anonymous, 17 years ago

Resolution: duplicate
Status: newclosed

comment:2 by Emmanuel Blot, 17 years ago

(dup of #5508, submitted twice)

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.