Edgewall Software
Modify

Opened 12 years ago

Closed 12 years ago

#10564 closed defect (fixed)

ProgrammingError when calling diff on a comment

Reported by: framay <franz.mayer@…> Owned by: Christian Boos
Priority: normal Milestone: 1.0
Component: ticket system Version: 0.13dev
Severity: minor Keywords: comment
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Zum Reproduzieren

Während der Ausführung von GET auf /ticket/7772 hat Trac einen internen Fehler gemeldet.

(Bitte geben Sie hier weitere Details an)

Anfrageparameter:

{'action': u'comment-diff',
 'cnum': u'1',
 'id': u'7772',
 'show': [],
 'version': u'1'}

User agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11

Systeminformationen

Systeminformation nicht verfügbar copied from "About Trac" page:

Trac 0.13dev-r10952 Babel 0.9.6 Genshi 0.6 mod_wsgi 2.8 (WSGIProcessGroup /trac/Legato WSGIApplicationGroup %{GLOBAL}) psycopg2 2.0.13 Pygments 1.4 Python 2.6.5 (r265:79063, Apr 16 2010, 14:15:55) [GCC 4.4.3] setuptools 0.6c11 Subversion 1.6.6 (r40053) jQuery: 1.5.1

Aktive Plugins

Plugininformation nicht verfügbar

Python-Zurückverfolgungsinformationen

Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\web\main.py", line 478, in _dispatch_request
    dispatcher.dispatch(req)
  File "build\bdist.win32\egg\trac\web\main.py", line 198, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\trac\ticket\web_ui.py", line 171, in process_request
    return self._process_ticket_request(req)
  File "build\bdist.win32\egg\trac\ticket\web_ui.py", line 490, in _process_ticket_request
    return self._render_comment_diff(req, ticket, data, cnum)
  File "build\bdist.win32\egg\trac\ticket\web_ui.py", line 953, in _render_comment_diff
    for change in self._get_comment_history(req, ticket, cnum):
  File "build\bdist.win32\egg\trac\ticket\web_ui.py", line 915, in _get_comment_history
    for version, date, author, comment in ticket.get_comment_history(cnum):
  File "build\bdist.win32\egg\trac\ticket\model.py", line 592, in get_comment_history
    (self.id, ts0, db.like_escape('_') + '%')):
  File "build\bdist.win32\egg\trac\db\util.py", line 121, in execute
    cursor.execute(query, params)
  File "build\bdist.win32\egg\trac\db\util.py", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
ProgrammingError: FEHLER:  NEW in einer Anfrage verwendet, die nicht Teil einer Regel ist
LINE 2:                         SELECT author, new FROM ticket_chang...
                                               ^

The strange thing is that it works on other comments. But on that one it throws an error. The comment is quite long (about 1 screen-page) and I just added several of these macros:

[[span((highlight something, style=background-color:yellow)]]

Furthermore the comment contains several phrases like "→"

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 12 years ago

Component: ticket systemdatabase backend
Milestone: 0.12.4
Priority: normalhigh

Which version of PostgreSQL are you using?

comment:2 by framay <franz.mayer@…>, 12 years ago

Replying to framay <franz.mayer@…>:

[...]
ProgrammingError: FEHLER:  NEW in einer Anfrage verwendet, die nicht Teil einer Regel ist
LINE 2:                         SELECT author, new FROM ticket_chang...
                                               ^

As in postgres-po the error message is in English: NEW used in query that is not in a rule

We are using PostgreSQL 8.4.9

in reply to:  1 comment:3 by Christian Boos, 12 years ago

Milestone: 0.12.41.0

Oops, wrong milestone assignment, the SELECT author, new SQL is not in 0.12.x.

comment:4 by Christian Boos, 12 years ago

Component: database backendticket system
Keywords: comment added
Priority: highnormal
Severity: normalminor

… and it looks like this was a typo from the start, as of course there's no column named new in that table!

Should be fixed by r11220.

comment:5 by Christian Boos, 12 years ago

Owner: set to Christian Boos

comment:6 by Christian Boos, 12 years ago

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos 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.