Hello, I've been getting the following set of errors whenever I create or update a node. Tac lite was added recently. It seems to be working fine in terms of restricting the nodes designated as private.
I have run update.php and eventhough it said no updates available, i forced it to do the update #2. It said it rebuilt the node access table.
I am running drupal 5.1.
Here's the error:
* warning: array_keys() [function.array-keys]: The first argument should be an array in /home/ihea/public_html/multicultural_health_education/modules/user/user.module on line 361.
* warning: implode() [function.implode]: Bad arguments. in /home/ihea/public_html/multicultural_health_education/modules/user/user.module on line 361.
* 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 ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/ihea/public_html/multicultural_health_education/includes/database.mysql.inc on line 172.
* warning: Invalid argument supplied for foreach() in /home/ihea/public_html/multicultural_health_education/sites/all/modules/tac_lite/tac_lite.module on line 317.
* warning: Invalid argument supplied for foreach() in /home/ihea/public_html/multicultural_health_education/sites/all/modules/tac_lite/tac_lite.module on line 317.
Comments
Comment #1
Aleet commentedsubscribe
Comment #2
Dave Cohen commentedThe warning on tac_lite.module line 317 implies that your user account has no roles. Since each user should have at least one role, this means you have another problem and I don't think it's related to tac_lite.
Disable tac_lite, then see if you have errors. Fix them, then re-enable tac_lite.
Comment #3
Aleet commentedthanks for your response.
I disabled tac_lite and still getting error. The best I can tell it is related to this issue in the user system:http://drupal.org/node/114074
Comment #4
astreib commentedHad the same error in tac_lite 6.x-1.6. After installing and activating the module, I would see the following errors in my error log:
Seeing the error was in the db_placeholders() function, I modified that to test that first argument was an array, or throw an ErrorException. That gave me the following stack trace:
So from what little I know about drupal internals, it looks like the webserver_auth module was loading the user which was firing the hook_user() functions, including tac_lite_user().
The first thing tac_lite_user() does is call user_access to see if the current user has "adminster tac_lite" permission. However apparently at this point $user is not yet set, thus triggering the errors.
A fix seems to be to pass the $account argument on to the user_access() call. The attached patch does this. Hope this may be helpful.See my next note. Disregard the patch attached to this comment.
Comment #5
astreib commentedActually my patch does not really fix the problem everywhere. I was still getting the error on the module admin page.
I looked at the tac_lite_user() function a little more and realized it's only doing anything when the $op is 'form' or 'categories'
So I just wrapped that test around the user_access() call and that seems to resolve everything (knock on wood).
Disregard the patch above.
Comment #6
tinker commented5.x version no longer supported.