Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13127 closed defect (fixed)

Plugin Issue: AttributeError: 'Environment' object has no attribute 'get_db_cnx'

Reported by: roman.gerhardt@… Owned by: Ryan J Ollos
Priority: normal Component: TracFormsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2

Description

Plugin Issue

PluginIssue:TracFormsPlugin

How to Reproduce

While doing a GET operation on /wiki, Trac issued an internal error.

This is caused by latest Trac making changes to the database API: Environment.get_db_cnx has been removed in Trac 1.1.2

Similar Tickets

#12334 #12652

Request parameters:

{}

User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Safari/537.36

System Information

Trac 1.2
Babel 0.9.6
Docutils 0.13.1
Genshi 0.7 (with speedups)
Pygments 1.4
pysqlite 2.6.0
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
RPC 1.1.6
setuptools 0.9.8
SQLite 3.7.17
Subversion 1.7.14 (r1542130)
jQuery 1.11.3
jQuery UI 1.11.4
jQuery Timepicker 1.5.5

Enabled Plugins

graphviz 1.3.0.1dev
LdapPlugin 0.7.0dev
ListMilestonesMacro 0.1.3
siteupload 0.11
Table-Sorter-Plugin 1.0
TestManager 1.9.0
TracForms 0.5dev
TracGenericClass 1.1.6
TracGenericWorkflow 1.0.5
TracIncludeMacro 3.0.0dev
TracIniAdminPanel 1.0.2
TracXMLRPC 1.1.6

Interface Customization

shared-htdocs CustomerCard.ico, MIO.ico, PlatformStartup.ico, central-stats.ico, cg2.ico, css, cup.ico, lb4x.ico, logo_cbcx_2009.png, mio.ico, mt.png, myTicket.ico, new.png, next.ico, pg.gif, repos.ico, sbt3.ico
shared-templates site.html
site-htdocs common, inieditorpanel, shared, site, tablesorter, testmanager, tracdragdrop, tracgenericclass, tracgenericworkflow, tracrpc
site-templates

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 613, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 263, in dispatch
    self._post_process_request(req, *resp)
  File "build/bdist.linux-x86_64/egg/trac/web/main.py", line 444, in _post_process_request
    resp = f.post_process_request(req, *resp[:-1])
  File "build/bdist.linux-x86_64/egg/tracforms/web_ui.py", line 49, in post_process_request
    form = Form(env, realm, resource_id)
  File "build/bdist.linux-x86_64/egg/tracforms/model.py", line 55, in __init__
    self._get_siblings(parent_realm, parent_id)
  File "build/bdist.linux-x86_64/egg/tracforms/model.py", line 71, in _get_siblings
    parent_id])) or []
  File "build/bdist.linux-x86_64/egg/tracforms/api.py", line 113, in wrapper
    result = getattr(observer, fn.__name__)(*_args, **_kw)
  File "build/bdist.linux-x86_64/egg/tracforms/formdb.py", line 71, in get_tracform_ids
    db = self._get_db(db)
  File "build/bdist.linux-x86_64/egg/tracforms/tracdb.py", line 167, in _get_db
    return db or self.env.get_db_cnx()
AttributeError: 'Environment' object has no attribute 'get_db_cnx'

Attachments (0)

Change History (4)

comment:1 Changed 8 years ago by Ryan J Ollos

Owner: set to Ryan J Ollos
Status: newaccepted

comment:2 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 16386:

TracForms 0.5dev: Make compatible with Trac 1.2

Fixes #13127.

comment:3 Changed 8 years ago by Ryan J Ollos

Lightly tested. Please make sure to backup your Trac environment before installing, and report any issues to this ticket.

comment:4 Changed 8 years ago by roman.gerhardt@…

thx it worked

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
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.