I have upgraded to Sign up 5x2.6 (from 5x2.5).

I get the following error message when accessing the Sign up administration page (admin/content/signup):

user warning: Not unique table/alias: 'e' query: SELECT n.nid, n.title, n.type, s.status AS signup_status, COUNT(s_l.nid) AS signup_total, s.close_signup_limit AS signup_close_signup_limit, e.event_start, e.timezone, e.event_start, e.timezone FROM node n INNER JOIN signup s ON s.nid = n.nid LEFT JOIN signup_log s_l ON s.nid = s_l.nid LEFT JOIN event e ON e.nid = n.nid LEFT JOIN event e ON e.nid = n.nid WHERE (s.status = 0) GROUP BY n.nid, n.title, signup_status, signup_close_signup_limit, e.event_start, e.timezone, e.event_start, e.timezone ORDER BY n.title ASC LIMIT 0, 25 in /home/activ41/public_html/site/includes/database.mysql.inc on line 174.

All my sites which use signup, exhibit the same problem (with the exact same error message).

Any help would be most appreciated.

Comments

dww’s picture

Title: User warning: Not unique table/alias: 'e' query: » SQL error on signup admin page (admin/content/signup) when there's more than one event-enabled node type
Assigned: Unassigned » dww
Category: support » bug
Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new989 bytes
new1.94 KB

Hehe, interesting. I'd never tested this case, but reading your report and the resulting error message, I knew right away what the problem is. _signup_event_admin_sql() is returning SQL fragments to build the query for the admin/content/signup page for each event-enabled node type. However, event.module stores all of its event data in a single table. If you have more than 1 event-enabled node type, there was nothing in the query to keep these JOINs unique. In fact, since it's all 1 table, the best solution is to just ensure that we only JOIN on {event} once, regardless of how many event-enabled node types we have. Attached patches should solve it in both DRUPAL-5--2 and HEAD (D6).

dww’s picture

Tested with event 5.x-1, event 5.x-2, and event 6.x-2. Saw the bug in all configurations (obviously) and the patch solves it in all configurations. See also #328295-4: event_join() ignores $type argument if you're trying this with event 6.x-2.

dww’s picture

Status: Needs review » Fixed

Whoops, meant to say -- "... and committed to HEAD and DRUPAL-5--2". ;)

big_smile’s picture

I have tried this out and it works perfectly on my sites.
I have not noticed any problems or side effects from using the patch.

Thanks for your help. ^_^

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.