Modify

Opened 16 years ago

Closed 9 years ago

#4137 closed defect (wontfix)

ProgrammingError: current transaction is aborted, commands ignored until end of transaction block

Reported by: anonymous Owned by: Marc
Priority: normal Component: PeerReviewPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

How to Reproduce

While doing a POST operation on /peerReviewView, Trac issued an internal error.

(please provide additional details here)

Request parameters:

{'Vote': u'yes', '__FORM_TOKEN': u'52c18c32a893319ac3383115', 'Review': u'4'}

User Agent was: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4

System Information

Trac 0.11.1
Python 2.4.3 (#1, Apr 3 2007, 07:17:42)
[GCC 4.1.1 (Gentoo 4.1.1-r3)]
setuptools 0.6c7
psycopg2 2.0.2 (dec dt ext pq3)
Genshi 0.5.1
mod_python 3.3.1
Pygments 0.10
Subversion 1.5.0 (r31699)
jQuery: 1.2.6

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "build/bdist.linux-i686/egg/codereview/peerReviewView.py", line 192, in process_request
  File "build/bdist.linux-i686/egg/codereview/peerReviewView.py", line 236, in vote
  File "build/bdist.linux-i686/egg/codereview/ReviewerStruct.py", line 47, in save
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 51, in execute
    return self.cursor.execute(sql)
ProgrammingError: current transaction is aborted, commands ignored until end of transaction block


Attachments (0)

Change History (3)

comment:1 Changed 16 years ago by serj@…

Fixed this by adding this in ReviewerStruct.py:

db.rollback()

also i modified this plugin to use with LDAP (permissions and users) can post the code if helps

       try:^
            db.rollback()
            cursor.execute("INSERT INTO Reviewers (IDReview, Reviewer, Status, Vote) VALUES('%s', '%s', '%s', '%s') "%(self.IDReview, self.Reviewer, self.Status, self.Vote))
            db.commit()
        except:
            #Update information in existing database entry
            db.rollback()
            cursor.execute("UPDATE Reviewers SET Status='%s', Vote='%s' WHERE IDReview='%s' AND Reviewer='%s'"% (self.Status, self.Vote, self.IDReview, self.Reviewer))
            db.commit()

comment:2 Changed 13 years ago by Marc

Owner: changed from Sebastian Marek to Marc

comment:3 Changed 9 years ago by Cinc-th

Resolution: wontfix
Status: newclosed

The plugin code doing all the database handling was rewritten by now and targets Trac version 0.12 and higher. The voting feature was entirely removed.

Thus this defect is obsolete.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Marc.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.