Closed (fixed)
Project:
Quiz
Version:
7.x-4.0-alpha1
Component:
Code - Quiz core
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2012 at 10:50 UTC
Updated:
22 Jun 2014 at 16:17 UTC
Jump to comment: Most recent
Comments
Comment #1
joel_osc commentedAfter some investigation the error is produced when lines 1436-1442 are executed:
$question_types = array_keys(_quiz_get_question_types());
//$placeholders = db_placeholders($question_types, 'text');
//$sql = 'SELECT COUNT(nid) FROM {node} WHERE type IN (' . $placeholders . ') AND nid = %d';
$questions_count = db_select('node', 'n')
->condition('type', array_keys(_quiz_get_question_types()), 'IN')
->countQuery()
->addTag('node_access')
->execute()
->fetchField();
I know this is not the solution, but commenting out the addTag('node_access') makes the problem go away. I am unsure how node_acess works - I believe it invokes the sites node_access modules to rewrite the SQL appropriately which in this case is not working. I am not using any fancy node_access modules - just the core. I have all permissions opened up (edit any *) for quiz and all quiz questions for this users role.
Comment #2
falcon commentedThanks for reporting