id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release 13543,OperationalError: ambiguous column name: id,Mikko,,"==== How to Reproduce ==== 1. Configure multiple custom fields (""dev"", ""sales"", ""users"" in this case with possible values """", ""S"", ""M"", ""L"" and ""XL"" for each field). 1. Open /query and build a custom query where you try to select multiple values for at least two custom fields and press ""Update"" 1. Select the URL in the browser address bar, copy and paste it into another browser window. Expected result: The page should look the same as after (2) when ""Update"" has been pressed. Actual result: Error page without the query interface nor query results: While doing a GET operation on `/query`, Trac issued an internal error. The problem seems to be caused by incorrect caching when query with multiple custom fields is done via GET. If I build the same query using custom query UI and press ""Update"" button, the query runs fine. The query also seems to work once if the same query has not been run in a while. The cause is probably similar to t:#13068 but this is about Filters because the problem still appears even with only Summary column selected. Note: trac report bug button automatically selected XmlRpcPlugin as the component for this ticket, but I think it's not the correct one. I believe the problem is in core Trac ticket query implementation. I have left the Component field in this bug as-is because I'm not sure how this should be handled here. This query had custom Filter on fields ""dev"", ""sales"" and ""users"". Request parameters: {{{ {u'col': [u'id', u'summary', u'type', u'status', u'priority', u'milestone', u'time'], u'dev': [u'S', u'M'], u'order': u'priority', u'sales': [u'XL', u'L'], u'users': [u'XL', u'L']} }}} User agent: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36` ==== System Information ==== || '''`Trac`''' || `1.2.3` || || '''`Genshi`''' || `0.7.1 (with speedups)` || || '''`pysqlite`''' || `2.6.0` || || '''`Python`''' || `2.7.12 (default, Nov 12 2018, 14:36:49) ` [[br]] `[GCC 5.4.0 20160609]` || || '''`RPC`''' || `1.1.7` || || '''`setuptools`''' || `40.8.0` || || '''`SQLite`''' || `3.11.0` || || '''`jQuery`''' || `1.11.3` || || '''`jQuery UI`''' || `1.11.4` || || '''`jQuery Timepicker`''' || `1.5.5` || ==== Enabled Plugins ==== || '''`TracXMLRPC`''' || `1.1.7` || ==== Interface Customization ==== ==== Python Traceback ==== {{{ Traceback (most recent call last): File ""/usr/local/lib/python2.7/dist-packages/trac/web/main.py"", line 647, in _dispatch_request dispatcher.dispatch(req) File ""/usr/local/lib/python2.7/dist-packages/trac/web/main.py"", line 248, in dispatch resp = chosen_handler.process_request(req) File ""/usr/local/lib/python2.7/dist-packages/trac/ticket/query.py"", line 1016, in process_request return self.display_html(req, query) File ""/usr/local/lib/python2.7/dist-packages/trac/ticket/query.py"", line 1122, in display_html tickets = query.execute(req, cached_ids=orig_list) File ""/usr/local/lib/python2.7/dist-packages/trac/ticket/query.py"", line 303, in execute self.num_items = self._count(sql, args) File ""/usr/local/lib/python2.7/dist-packages/trac/ticket/query.py"", line 284, in _count % sql, args)[0][0] File ""/usr/local/lib/python2.7/dist-packages/trac/db/api.py"", line 122, in execute return db.execute(query, params) File ""/usr/local/lib/python2.7/dist-packages/trac/db/util.py"", line 128, in execute cursor.execute(query, params if params is not None else []) File ""/usr/local/lib/python2.7/dist-packages/trac/db/util.py"", line 72, in execute return self.cursor.execute(sql_escape_percent(sql), args) File ""/usr/local/lib/python2.7/dist-packages/trac/db/sqlite_backend.py"", line 88, in execute result = PyFormatCursor.execute(self, *args) File ""/usr/local/lib/python2.7/dist-packages/trac/db/sqlite_backend.py"", line 64, in execute args or []) File ""/usr/local/lib/python2.7/dist-packages/trac/db/sqlite_backend.py"", line 55, in _rollback_on_error return function(self, *args, **kwargs) OperationalError: ambiguous column name: id }}}",defect,closed,normal,XmlRpcPlugin,normal,cantfix,,,1.2