#11147 closed defect (cantfix)
Missing FROM-clause entry for table "s"
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | general | Version: | 1.0.1 |
Severity: | normal | Keywords: | |
Cc: | ryan.j.ollos@…, dev@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
How to Reproduce
While doing a GET operation on /admin/accounts/users
, Trac issued an internal error.
On the admin page I clicked a user to modify the account. Note: this is a bloodhound install.
Request parameters:
{'cat_id': u'accounts', 'panel_id': u'users', 'path_info': None, 'user': u'achristianson'}
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.43 Safari/537.31
System Information
Trac | 1.0.1
|
Babel | 0.9.6
|
Bloodhound Trac | 1.0.1
|
Genshi | 0.6 (with speedups)
|
mod_wsgi | 3.3 (WSGIProcessGroup bloodhound_tracker WSGIApplicationGroup %{GLOBAL})
|
psycopg2 | 2.5
|
Pygments | 1.6
|
Python | 2.7.3 (default, Aug 1 2012, 05:25:23) [GCC 4.6.3]
|
pytz | 2013b
|
setuptools | 0.6c11
|
jQuery | 1.7.2
|
Enabled Plugins
BloodhoundDashboardPlugin | 0.6.0dev-r1466013
|
BloodhoundMultiProduct | 0.6.0dev-r1465992
|
BloodhoundSearchPlugin | 0.6.0dev-r1465916
|
BloodhoundTheme | 0.6.0dev-r1466530
|
TracAccountManager | 0.4.3
|
TracPermRedirect | 3.0
|
TracThemeEngine | 2.1.3
|
Python Traceback
Traceback (most recent call last): File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/trac/web/main.py", line 510, in _dispatch_request dispatcher.dispatch(req) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/trac/web/main.py", line 214, in dispatch resp = chosen_handler.process_request(req) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/trac/admin/web_ui.py", line 130, in process_request path_info) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/acct_mgr/admin.py", line 204, in render_admin_panel return self._do_users(req) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/acct_mgr/admin.py", line 334, in _do_users return self._do_acct_details(req) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/acct_mgr/admin.py", line 497, in _do_acct_details for username_, name, email in self.env.get_known_users(): File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/trac/env.py", line 669, in get_known_users """): File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/multiproduct/dbcursor.py", line 183, in __call__ return self.db_context(*args, **kwargs) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/trac/db/api.py", line 122, in execute return db.execute(query, params) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/trac/db/util.py", line 121, in execute cursor.execute(query, params) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/multiproduct/dbcursor.py", line 83, in execute return super(BloodhoundIterableCursor, self).execute(translate_sql(self.env, sql), args=args) File "/var/bloodhound/installer/bloodhound/lib/python2.7/site-packages/trac/db/util.py", line 66, in execute return self.cursor.execute(sql) ProgrammingError: missing FROM-clause entry for table "s" LINE 4: ... LEFT JOIN session_attribute AS n ON (n.sid=s.sid ^
Attachments (1)
Change History (12)
comment:1 by , 12 years ago
Resolution: | → cantfix |
---|---|
Status: | new → closed |
comment:2 by , 12 years ago
The BloodHound project should really either disable the built-in Trac error reporting (as found on Trac error pages), or redo it to push such reports to their own issue tracker. See for instance TracIni setting [project] admin_trac_url = ...
for an initial quick-fix.
comment:3 by , 12 years ago
The BloodHound development team is currently discussing on the mailing list how to encourage reporting of issues like this one to https://issues.apache.org/bloodhound (taking into consideration comments in #10898). However, in the unfortunate case that the errors land here, feel free to CC dev@bloodhound.apache.org
on any BloodHound issues.
comment:4 by , 12 years ago
Cc: | added |
---|
Here is the mailing list thread, in case anyone is interested or has additional ideas that they'd like to raise directly there.
comment:5 by , 12 years ago
Cc: | added |
---|
follow-up: 8 comment:6 by , 12 years ago
Added dev@… to cc list. Freshly registered users cannot post new tickets at https://issues.apache.org/bloodhound/newticket I will continue to watch this ticket for further suggestions.
comment:7 by , 12 years ago
solved.
changed 661-670 of bloodhound/lib/python2.7/site-packages/trac/env.py
from:
for username, name, email in self.db_query(""" SELECT DISTINCT s.sid, n.value, e.value FROM session AS s LEFT JOIN session_attribute AS n ON (n.sid=s.sid and n.authenticated=1 AND n.name = 'name') LEFT JOIN session_attribute AS e ON (e.sid=s.sid AND e.authenticated=1 AND e.name = 'email') WHERE s.authenticated=1 ORDER BY s.sid """): yield username, name, email
to:
for username, name, email in self.db_query(""" SELECT DISTINCT session.sid, n.value, e.value FROM session LEFT JOIN session_attribute AS n ON (n.sid=session.sid and n.authenticated=1 AND n.name = 'name') LEFT JOIN session_attribute AS e ON (e.sid=session.sid AND e.authenticated=1 AND e.name = 'email') WHERE session.authenticated=1 ORDER BY session.sid """): yield username, name, email
postgres log showed the query coming in missing the "AS s" clause. I have no idea why.
follow-up: 9 comment:8 by , 12 years ago
Replying to trac-bugs@…:
Added dev@… to cc list. Freshly registered users cannot post new tickets at https://issues.apache.org/bloodhound/newticket I will continue to watch this ticket for further suggestions.
Just because you CAN does not mean you SHOULD… If you have something to communicate to bloodhound developers then why not send it by email, get on their mailing lists, or simply register a user in their issue tracker?
comment:9 by , 12 years ago
Replying to osimons:
Replying to trac-bugs@…:
Freshly registered users cannot post new tickets at https://issues.apache.org/bloodhound/newticket
I seem to have missed this in my first reply, but are you actually saying that you can register a user @ bloodhound but still not be allowed to register a bug? So you register to get read-only access to the same public information, with a hope of one day being allowed to contribute your information, bugs and patches…?
by , 12 years ago
Attachment: | logged into bloodhound tracker.JPG added |
---|
Fresh registrants at https://issues.apache.org/bloodhound cannot post bugs
follow-up: 11 comment:10 by , 12 years ago
I checked https://issues.apache.org/bloodhound today and can now post a ticket. I registered a new account and took a screenshot; attached.
I'm guessing that a moderator of some sort has to flag new users with TICKET_CREATE before they can post tickets.
I've cross posted this bug there: https://issues.apache.org/bloodhound/ticket/500#
comment:11 by , 12 years ago
Replying to anonymous:
I'm guessing that a moderator of some sort has to flag new users with TICKET_CREATE before they can post tickets.
Yes, that is right. Perhaps not ideal, but we are still working out our processes, and there are a variety of opinions on how things should be done (i.e. the behavior I describe here may not represent my own opinions on the matter) . Feel free to suggest on the mailing list if you've found this to be an inconvenience. For issues like this, feedback from users is the best way to get things right.
I'll be working a ticket in Bloodhound (bh:#503) with the goal of keeping Bloodhound issues from being directed to t.e.o and t-h.o.
BloodHound issue. Please report it to https://issues.apache.org/bloodhound/.