hi,
simple access appears a nice approach to access rights! thanx.
i set up a fresh drupal 4.7 beta 6 and added 3 users.
i downloaded simple_access from drupal.org.
if i try to create content with a user different from my masteruser i receive the following error:
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/apache2/drupal-4.7.0-beta6/modules/simple_access/simple_access.module on line 149.
i deactivates simple_access, removed the tables, replaced the files by the lates cvs version, loaded the tables into the db and enabled the module -> same result.
markus
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | simple_access_0.module | 28.66 KB | Mojah |
Comments
Comment #1
micahw156I found a possible workaround for this issue: In admin/access, I granted "assign access to nodes" under the simple_access module to the users who have rights to create nodes, and now those users do not get the error. I would think that there need to be some sort of defaults put in place for those users who shouldn't have this grant access, but at least I can continue to use this module while a final fix is determined.
Comment #2
Mojah commentedRefer to this node ( by http://drupal.org/user/21167 ) for a patch that must be made to the simple_access.module
http://drupal.org/node/63950
It will resolve the disactivation issue.
The wrong form is being called.
On line 442 replace
$output .= drupal_get_form('simple_access_deactivate', $form);
with
$output .= drupal_get_form('simple_access_setup_page', $form);
I tested and it works fine. The working .module file is attached.
Comment #3
LazarusLong-1 commentedI think the patch submitted by Mojah is correct but off-topic. It seems to patch the deactivation issue, not the bad function call on line 149.
I've tried with a cast to array on line 149, that is
$form = array_merge($form, array(simple_access_form($form['#node'])));instead of
$form = array_merge($form, $simple_access_form);and it seems to work. But not really tested by now.
Hope it helps.
Comment #4
gordon commentedI fixed this a week or so ago in CVS, I have back ported this to 4.7
Comment #5
(not verified) commented