I get the following 2 errors when logged in as another role other than admin:
It seems fine when logged in as the admin, but its going to be used by other roles and hence breaks as soon as the checkbox is checked to allow other users from that role.

user warning: Unknown table 'n' in on clause query: SELECT tdr.rid, r.name FROM to_do_roles as tdr JOIN role as r ON tdr.rid = r.rid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 10 AND na.realm = 'content_access_author') OR (na.gid = 2 AND na.realm = 'content_access_rid') OR (na.gid = 7 AND na.realm = 'content_access_rid') OR (na.gid = 1 AND na.realm = 'private') OR (na.gid = 10 AND na.realm = 'private_author') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 7 AND na.realm = 'forum_access') OR (na.gid = 2 AND na.realm = 'image_gallery_access') OR (na.gid = 7 AND na.realm = 'image_gallery_access'))) AND ( tdr.vid = 1192) in /home/mwassoci/public_html/sites/all/modules/to_do/to_do.module on line 846.

user warning: Unknown table 'n' in on clause query: SELECT tdau.uid, u.name FROM to_do_assigned_users as tdau JOIN users as u ON tdau.uid = u.uid INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 10 AND na.realm = 'content_access_author') OR (na.gid = 2 AND na.realm = 'content_access_rid') OR (na.gid = 7 AND na.realm = 'content_access_rid') OR (na.gid = 1 AND na.realm = 'private') OR (na.gid = 10 AND na.realm = 'private_author') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 7 AND na.realm = 'forum_access') OR (na.gid = 2 AND na.realm = 'image_gallery_access') OR (na.gid = 7 AND na.realm = 'image_gallery_access'))) AND ( tdau.vid = 1192) in /home/mwassoci/public_html/sites/all/modules/to_do/to_do.module on line 863.

Comments

Todd Young’s picture

Title: Error when trying to create a to do when logged in as other role » I get a similar error as Admin with no new roles defined
Component: User interface » Code

I get a similar error as Admin with no new roles defined. There is a problem with "to_do_roles" - I see nothing in the way of being able to create or assign any role types or users to tasks. Error follows:

user warning: Unknown column 'n.type' in 'where clause' query: SELECT tdr.rid, r.name FROM dru_to_do_roles as tdr JOIN dru_role as r ON tdr.rid = r.rid WHERE (n.type != 'pm') AND ( tdr.vid = 4) in /***omitted***/sites/all/modules/to_do/to_do.module on line 846.

user warning: Unknown column 'n.type' in 'where clause' query: SELECT tdau.uid, u.name FROM dru_to_do_assigned_users as tdau JOIN dru_users as u ON tdau.uid = u.uid WHERE (n.type != 'pm') AND ( tdau.vid = 4) in /***omitted***/sites/all/modules/to_do/to_do.module on line 863.

jaypan’s picture

I believe I have fixed these errors in the next version of the module, due out in the next day or two. Please let me know if the errors arise again.

jaypan’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

wayne57’s picture

I may have an issue related to this. Although I dont get errors as such, but users get redirected to my error message page saying they cannot access the content? I have now unchecked any checkboxes in the Node Access module, but it is only the admin who can use this module. I want some of my other roles to be able to create and assign todos, which they can, but when they then try to open them they get redirected to the error page.

Has anyone got a solution to this?
I have also raised this at: #766108: Users cannot view todos

AlexisWilke’s picture

Version: 6.x-1.1-rc4 » 6.x-1.x-dev
Assigned: Unassigned » AlexisWilke

This error is fixed now. The module would indeed not properly handle one of the JOIN that is added by the SQL rewrite process. The node has to be last in the FROM list!

Version 1.x-dev has the fix (May 22, 2010.)

Thank you.
Alexis Wilke