One of the tickets probably contains "this is a new product" in a product field. I guess this is the name of your newly created product. How it got there in the first place, I am still not sure.
Can you please look at your trac.ini and post the value of default_product option in section [ticket]? I am still trying to reproduce you error, but so far, it was only possible by inserting a value with a an invalid product directly into the database. On Tue, Jul 23, 2013 at 11:25 AM, Ruggero Marchei <[email protected]> wrote: > I applied the patch and with that I was able to create a new ticket even > after adding a new product and select it as a default. > > Anyway, after creating the new ticket, if I click on "tickets" on the web > interface I have this error: > > Widget error > > Error × Exception raised while rendering widget. Contact your administrator > for further details. > Widget name TicketQueryException typeLookupError Log entry ID > 9ecf1f56-b691-4fb1-b9f6-65590bc2df9b > > From the logs I get: > > 2013-07-23 11:21:52,745 Trac[web_ui] ERROR: - > 9ecf1f56-b691-4fb1-b9f6-65590bc2df9b - Error rendering widget TicketQuery > with options {'args': {'max': 10, 'query': > 'status=!closed&group=product&col=id&col=summary&col=owner&col=status&col=priority&order=priority&col=milestone', > 'title': 'Active Tickets'}} > Traceback (most recent call last): > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhdashboard/web_ui.py", > line 269, in _render_widget > return wp.render_widget(name, ctx, options) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhdashboard/util.py", > line 132, in widget_name_checker > return f(self, name, *args, **kwargs) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhdashboard/widgets/query.py", > line 102, in render_widget > data = qrymdl.process_request(fakereq)[1] > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py", > line 230, in process_request > return self.display_html(req, query) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py", > line 242, in display_html > tickets = query.execute(req) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py", > line 128, in execute > row[product_idx], val) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/ticket/query.py", > line 71, in _get_ticket_href > env = lookup_product_env(self.env, prefix) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/env.py", > line 911, in lookup_env > return ProductEnvironment(global_env, prefix) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/cache.py", > line 67, in wrapper > result = user_function(*args, **kwds) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/env.py", > line 379, in __call__ > return ComponentMeta.__call__(self, *args, **kwargs) > File "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/core.py", > line 140, in __call__ > self.__init__(*args, **kwargs) > File "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/core.py", > line 107, in new_init > original_init(self, *args, **kwargs) > File > "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/env.py", > line 534, in __init__ > raise LookupError("Missing product %s" % (product,)) > LookupError: Missing product this is a new product > > > On 23 July 2013 10:45, Anze Staric <[email protected]> wrote: > >> I have attached a patch to the issue #601, that should fix the issue. >> Can you give it a try? >> >> >> https://issues.apache.org/bloodhound/attachment/ticket/601/t601_r1505871_do_not_add_product_column_if_already_exists_in_insert.diff >> >> On Tue, Jul 23, 2013 at 9:52 AM, Ruggero Marchei >> <[email protected]> wrote: >> > It happens on both but I noticed it happens only when I select the new >> > product as "default". >> > >> > To reproduce the problem: create a new product, select it as default and >> > then apply changes. >> > New ticket creation then fails with the error mentioned before. >> > >> > >> > On 23 July 2013 08:30, Anze Staric <[email protected]> wrote: >> > >> >> After adding a new product, did you try to add a ticket using a quick >> >> ticket dialog or /newticket page? >> >> >> >> On Tue, Jul 23, 2013 at 12:55 AM, Ruggero Marchei >> >> <[email protected]> wrote: >> >> > After some tests I noticed that if I add a new product and then try to >> >> > create a new ticket it fails with the error I was getting before, so >> that >> >> > patch resolves the issue only partially. >> >> > >> >> > Ruggero >> >> > >> >> > >> >> > On 22 July 2013 22:43, Ruggero Marchei <[email protected]> >> >> wrote: >> >> > >> >> >> Thanks for the suggestion Matevz, >> >> >> >> >> >> I tried version 0.7.0dev-r1505666 (svn revision 1505794) and it fixed >> >> the >> >> >> issue! >> >> >> >> >> >> Ruggero >> >> >> >> >> >> >> >> >> On 22 July 2013 21:35, Matevž Bradač <[email protected]> wrote: >> >> >> >> >> >>> >> >> >>> On 22. Jul, 2013, at 21:22, Ruggero Marchei wrote: >> >> >>> >> >> >>> > Hi all, >> >> >>> > >> >> >>> > I'm trying Bloodhound 0.6.0 on a CentOS 6.4 x86_64 (python 2.6.6) >> >> using >> >> >>> > Mysql as a backend database. I followed the detailed installation >> >> guide >> >> >>> and >> >> >>> > the installation completes without any error but is impossible to >> >> >>> create a >> >> >>> > new ticket. I can change preferences or create a new "product" >> >> without >> >> >>> any >> >> >>> > problem. The error found in the log file is: >> >> >>> > >> >> >>> > 2013-07-22 21:00:04,633 Trac[env] WARNING: product_base_url option >> >> not >> >> >>> set >> >> >>> > in configuration, generated links may be incorrect >> >> >>> > 2013-07-22 21:00:04,634 Trac[main] DEBUG: Dispatching >> >> >>> > <ProductRequestWithSession "POST '/qct'"> >> >> >>> > 2013-07-22 21:00:04,653 Trac[session] DEBUG: Retrieving session >> for >> >> ID >> >> >>> > u'admin' >> >> >>> > 2013-07-22 21:00:04,661 Trac[main] DEBUG: Negotiated locale: None >> -> >> >> >>> en_US >> >> >>> > 2013-07-22 21:00:04,683 Trac[api] WARNING: Unable to find >> repository >> >> >>> > '(default)' for synchronization >> >> >>> > 2013-07-22 21:00:04,743 Trac[theme] ERROR: BH: Quick create ticket >> >> >>> failed >> >> >>> > (1110, "Column 'product' specified twice") >> >> >>> > Traceback (most recent call last): >> >> >>> > File >> >> >>> > >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhtheme/theme.py", >> >> >>> > line 519, in process_request >> >> >>> > product, tid = self.create(req, summary, desc, attrs, True) >> >> >>> > File >> >> >>> > >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/bhtheme/theme.py", >> >> >>> > line 552, in create >> >> >>> > t.insert() >> >> >>> > File >> >> >>> > >> >> >>> >> >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/ticket/model.py", >> >> >>> > line 241, in insert >> >> >>> > [values[name] for name in std_fields]) >> >> >>> > File >> >> >>> > >> >> >>> >> >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/dbcursor.py", >> >> >>> > line 143, in execute >> >> >>> > return self.cursor.execute(sql, args=args) >> >> >>> > File >> >> >>> > >> >> >>> >> >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/multiproduct/dbcursor.py", >> >> >>> > line 83, in execute >> >> >>> > return super(BloodhoundIterableCursor, >> >> >>> > self).execute(translate_sql(self.env, sql), args=args) >> >> >>> > File >> >> >>> > >> >> "/srv/bloodhound/virtenv/lib/python2.6/site-packages/trac/db/util.py", >> >> >>> line >> >> >>> > 65, in execute >> >> >>> > return self.cursor.execute(sql_escape_percent(sql), args) >> >> >>> > File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", >> line >> >> 173, >> >> >>> > in execute >> >> >>> > self.errorhandler(self, exc, value) >> >> >>> > File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", >> >> line >> >> >>> > 36, in defaulterrorhandler >> >> >>> > raise errorclass, errorvalue >> >> >>> > ProgrammingError: (1110, "Column 'product' specified twice") >> >> >>> > >> >> >>> > >> >> >>> > It is possible to reproduce the issue installing a CentOS 6.4 >> minimal >> >> >>> then >> >> >>> > running the commands listed here: >> http://fpaste.org/27062/52016013/ >> >> >>> > Then login as admin/password and try to create a new ticket. The >> GUI >> >> >>> raises >> >> >>> > the error "Could not create ticket . Error : Internal Server >> Error" >> >> >>> > >> >> >>> > Is there something wrong with my setup? Could it be a bug? >> >> >>> > >> >> >>> > Thanks in advance, >> >> >>> > Ruggero >> >> >>> >> >> >>> Hi Ruggero, >> >> >>> >> >> >>> This seems to be related to the issue reported for Postgres[1]. >> >> >>> Could you please try installing Bloodhound from the subversion >> >> repository >> >> >>> (trunk), Anze implemented a fix in r1505666 which may help. >> >> >>> >> >> >>> [1] - https://issues.apache.org/bloodhound/ticket/601 >> >> >>> >> >> >>> -- >> >> >>> matevz >> >> >>> >> >> >>> >> >> >> >> >> >>
