If an invalid user tries to login, a bunch of warnings are spewed out at the top of the page html, moving the entire page down, and displaying the errors below:
(A note about line numbers listed below: I've installed the "permissions for edit node permissions" patch)
warning: array_keys(): The first argument should be an array in /home/drupal/modules/node_privacy_byrole.module on line 143.
warning: Invalid argument supplied for foreach() in /home/drupal/modules/node.module on line 1675.
warning: array_keys(): The first argument should be an array in /home/rioterrace/domains/rioterracehoa.org/public_html/test/modules/node_privacy_byrole.module on line 143.
warning: Invalid argument supplied for foreach() in /home/drupal/modules/node.module on line 1675.
warning: array_keys(): The first argument should be an array in /home/drupal/modules/node_privacy_byrole.module on line 143.
warning: Invalid argument supplied for foreach() in /home/drupal/modules/node.module on line 1675.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | node_privacy_byrole_role_2.patch | 864 bytes | Jhef.Vicedo |
| error.png | 36.47 KB | stelman |
Comments
Comment #1
stelman commentedbtw: I edited the paths in the error statements I listed for the sake of brevity, and messed one up, so that's why they don't all match.
A screenshot is attached to the original post.
Comment #2
ankur commentedI wasn't able to reproduce the error. This is likely an issue with the patch that you tried. As far as the 'edit permissions' permission goes, this may be integrated as a something you can configure in a node's workflow in the future, but not at this time.
-Ankur
Comment #3
Jhef.Vicedo commented$user->roles property for invalid users are empty that's why there is an error in array_keys() 'argument type' and in foreach(). this patch fix this.
Comment #4
gmills@gregmills.com commentedI'm getting the same error. How do I apply the patch?
Comment #5
ankur commentedRefreshing this thread so that it floats to the top. Patch will be examined for 4.5 -> 4.6 port.
-Ankur
Comment #6
keschrich commentedI am having the same problem, although I do not use node_privacy_byrole, rather I've been using nodeperm_role.module.
warning: array_keys(): The first argument should be an array in /home/troop428/public_html/drupal-cvs/modules/nodeperm_role/nodeperm_role.module on line 31.
warning: Invalid argument supplied for foreach() in /home/troop428/public_html/drupal-cvs/modules/node.module on line 1961.
warning: array_keys(): The first argument should be an array in /home/troop428/public_html/drupal-cvs/modules/nodeperm_role/nodeperm_role.module on line 31.
warning: Invalid argument supplied for foreach() in /home/troop428/public_html/drupal-cvs/modules/node.module on line 1915.
Bottom four lines are repeated about a dozen or so times.
Comment #7
ankur commentedCommited to CVS HEAD.
Link to diff:
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/node_privacy_...
Comment #8
(not verified) commentedComment #9
(not verified) commented