I have a user, TA. Since I am starting a new class, I created a new group and added that group to TA user. When I login as TA, this new OG won't show up under Gradebook. All the previous groups shows up fine.
I then go to this new group home where I can click Gradebook from the Group Detail block. I get error below. I see 'coherent_access' but not sure what that means. I have manually cleared caches but to no avail. Please help!
==========
* warning: Wrong parameter count for array_merge() in //sites/all/modules/gradebook/gradebookapi.module on line 253.
* warning: implode() [function.implode]: Invalid arguments passed in //sites/all/modules/gradebook/gradebookapi.module on line 253.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND n.status = 1)' at line 1 query: SELECT COUNT(DISTINCT(n.nid)) FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN term_data td ON tn.tid = td.tid INNER JOIN gradebookapi_assignment a ON n.nid = a.nid 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 = 45 AND na.realm = 'coherent_access') OR (na.gid = 37 AND na.realm = 'coherent_access') OR (na.gid = 249 AND na.realm = 'coherent_access') OR (na.gid = 41 AND na.realm = 'coherent_access') OR (na.gid = 273 AND na.realm = 'coherent_access') OR (na.gid = 49 AND na.realm = 'coherent_access') OR (na.gid = 53 AND na.realm = 'coherent_access') OR (na.gid = 57 AND na.realm = 'coherent_access') OR
.
.
.
* user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND n.status = 1 )ORDER BY td.name ASC LIMIT 0, 20' at line 1 query: SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN term_data td ON tn.tid = td.tid INNER JOIN gradebookapi_assignment a ON n.nid = a.nid 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 = 45 AND na.realm = 'coherent_access') OR (na.gid = 37 AND na.realm = 'coherent_access') OR (na.gid = 249 AND na.realm = 'coherent_access') OR (na.gid = 41 AND na.realm = 'coherent_access') OR (na.gid = 273 AND na.realm = 'coherent_access') OR (na.gid = 49 AND na.realm = 'coherent_access') OR (na.gid = 53 AND na.realm = 'coherent_access') OR
.
.
.
(na.gid = 799 AND na.realm = 'og_subscriber') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 5 AND na.realm = 'forum_access') OR (na.gid = 7 AND na.realm = 'forum_access') OR (na.gid = 8 AND na.realm = 'forum_access'))) AND ( tn.tid IN () AND n.status = 1 )ORDER BY td.name ASC LIMIT 0, 20 in //sites/all/modules/gradebook/gradebookapi.module on line 270.
Comments
Comment #1
MGN commentedHi Madflute, its good to hear from you, but this is absolutely bizzare....I am not sure what would cause sql code like that ... its a combination of what we have in gradebookapi.module and something else.
Have you recently updated drupal or any contrib modules?
This only happens with the new group? Have you tried deleting the new group and recreating it?
Are you using the latest dev of gradebook? and og_gradebook? (If you are not sure, can you tell me the file version ID tag for gradebookapi.module and og_gradebook.module?)
Can you try disabling coherent_access and see if the problem persists?
Comment #2
madflute commentedHello MGN, thanks for your quick response.
Everything is latest.
Gradebook 6.x-2.x-dev (2009-Jun-03)
OG Gradebook 6.x-2.x-dev (2009-Apr-02)
I wasn't sure if I should try 6.x-2.0-beta2 (2009-Feb-25), should I?
Yes, this is a new group. I can't delete this group since I already spent hours to create nodes for this group. Deleting the group and attaching these tens of nodes to new group will be tedious - yes, I will do it if I have to, but not just yet :-)
Disabling coherent_access on my local dev machine surely reduced the error log but the symptom is the same. Here is the new log:
=====
• warning: Wrong parameter count for array_merge() in example.com/sites/all/modules/gradebook/gradebookapi.module on line 253.
• warning: implode() [function.implode]: Bad arguments. in example.com/sites/all/modules/gradebook/gradebookapi.module on line 253.
• user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND n.status = 1)' at line 1 query: SELECT COUNT(DISTINCT(n.nid)) FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN term_data td ON tn.tid = td.tid INNER JOIN gradebookapi_assignment a ON n.nid = a.nid 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 = 0 AND na.realm = 'og_public') OR (na.gid = 796 AND na.realm = 'og_subscriber') OR (na.gid = 797 AND na.realm = 'og_subscriber') OR (na.gid = 798 AND na.realm = 'og_subscriber') OR (na.gid = 799 AND na.realm = 'og_subscriber') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 5 AND na.realm = 'forum_access') OR (na.gid = 7 AND na.realm = 'forum_access') OR (na.gid = 8 AND na.realm = 'forum_access'))) AND ( tn.tid IN () AND n.status = 1) in example.com/sites/all/modules/gradebook/gradebookapi.module on line 270.
• user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND n.status = 1 )ORDER BY td.name ASC LIMIT 0, 20' at line 1 query: SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM node n INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN term_data td ON tn.tid = td.tid INNER JOIN gradebookapi_assignment a ON n.nid = a.nid 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 = 0 AND na.realm = 'og_public') OR (na.gid = 796 AND na.realm = 'og_subscriber') OR (na.gid = 797 AND na.realm = 'og_subscriber') OR (na.gid = 798 AND na.realm = 'og_subscriber') OR (na.gid = 799 AND na.realm = 'og_subscriber') OR (na.gid = 2 AND na.realm = 'forum_access') OR (na.gid = 5 AND na.realm = 'forum_access') OR (na.gid = 7 AND na.realm = 'forum_access') OR (na.gid = 8 AND na.realm = 'forum_access'))) AND ( tn.tid IN () AND n.status = 1 )ORDER BY td.name ASC LIMIT 0, 20 in example.com/sites/all/modules/gradebook/gradebookapi.module on line 270.
Comment #3
madflute commentedI just created a new user account, and received the same error. I guess I have to delete the group and start over to see if it makes errors go away. I will try to do that sometime tonight.
:_(
-Hiro
Comment #4
MGN commentedStick with the dev versions of gradebook and og_gradebook...
Have you recently upgraded organic groups?
Comment #5
madflute commentedI think I did, a week ago or so, maybe?
Organic groups 6.x-1.4
I am about to delete the group and starting over.
Comment #6
madflute commentedI just deleted the new group and recreated one on my dev machine, and everything seems to work. No more errors. But gradebook assignment list still shows the deleted one. Since I gave the same group name, I made the situation a bit confusing.
Anyway, I must do this on all the nodes on my live site. I can do it. I can do it.
-Hiro
Comment #7
MGN commentedInteresting...I am still curious why this happened. If you come across a particular step in the process where things seem to break, please report it so I can follow up. Perhaps it had something to do with the og upgrade...I'll look into that.
Comment #8
madflute commentedI think I had group created before OG update, and I started to attach Gradebook nodes after the update.
By the way, any tip to remove the broken group from Gradebook list would be appreciated. I have 2 identical ones, one is broken, and the other is working. I need to remove the broken one from the list to avoid confusion. The broken group is already deleted so I can't rename it from the group interface.
-Hiro
Comment #9
MGN commentedI think you just need to delete the taxonomy structure for the broken group. Look for the gradebook vocabulary at admin/content/taxonomy/list and click on list terms. The gradebooks are the top level terms listed for the Gradebook vocabulary - you should be able to figure out which one goes with the broken group. Deleting the gradebook term for the broken group will also delete any of its child terms (gradebook categories for that gradebook). So be careful to delete the correct term!
Comment #10
madflute commentedAhhh, fixed! Thank you!
-Hiro
Comment #11
MGN commentedGreat. I am glad there is a straightforward solution, but would like to better understand the problem.
I am changing the issue settings to better reflect the issue.
I'll keep this open while I do an og update on a test site and try to recreate the problem.