Trying to use module grants with SPACES modules I get these errors:

  • warning: array_fill() [function.array-fill]: Number of elements must be positive in E:\server\drupal\includes\database.inc on line 253.
  • warning: implode() [function.implode]: Invalid arguments passed in E:\server\drupal\includes\database.inc on line 253.
  • warning: array_keys() [function.array-keys]: The first argument should be an array in E:\server\drupal\modules\user\user.module on line 502.
  • 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 p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in E:\server\drupal\modules\user\user.module on line 502.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RdeBoer’s picture

Hi MXT,
To help me reproduce the errors and debug can you tell us which version of http://drupal.org/project/spaces you're using? Is it 6.x-3.0-beta4 ?
Thanks!

cwaring’s picture

I'm experiencing the same issues described against Spaces-6.x-3.0-beta4 (with spaces_og enabled). I haven't tested any other version as I'm running a fresh install.

RdeBoer’s picture

Just wondering whether anyone tried this recently with the latest versions of Module Grants and Spaces as both modules have undergone some changes.

I have installed Spaces (and Features and Context etc.) and haven't seen any of the errors above, yet. Mind you I haven't used it in earnest, so any tips as to what pages generate the above errors would be welcome.

RdeBoer’s picture

Version: 6.x-3.5 » 6.x-3.6
Assigned: Unassigned » RdeBoer
Status: Active » Postponed (maintainer needs more info)
marcus178’s picture

I'm getting the same error as well on an Open Atrium install.

Here's what I have installed
Spaces 6.x-3.0
Module Grants 6.x-3.6
Taxonomy Access Control 6.x-1.2

Basically trying to get Taxonomy Access Control working with OG which this module does until I get this error and can't view any content.

marcus178’s picture

Sorry to pester but any ideas on how to fix this.

Just in case it's relevant I'm also using OG 6.x-2.1

RdeBoer’s picture

@marcus178, #6
I understand your frustration, but with D7 ports and all that I currently don't have time to look at this as a first priority.
I will revisit, but not in the next couple of weeks.
Sorry.
Maybe someone else has time to dig deeper into this.

danillonunes’s picture

I have the same error. Think this patch fixes it. Someone can test it and confirm please?

danillonunes’s picture

Oh, sorry, the patch above is the one I used on my project vcs.

That's the correct one.

danillonunes’s picture

Haha, just uploaded the wrong patch again... Now the correct.

danillonunes’s picture

Status: Postponed (maintainer needs more info) » Needs review

Also, marking as needs review.

RdeBoer’s picture

Thanks for the patch danillonunes! Nice and easy too.
Will include in the next release.

RdeBoer’s picture

Status: Needs review » Fixed

Patch applied to Git master branch. Will be available in 6.x-3.7.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

MrAdamJohn’s picture

Version: 6.x-3.6 » 6.x-3.8

We are working on a site that has robust use of Spaces and began working in the Content Access elements, including the much anticipated use once again of the most celebrated Module Grants module. Unfortunately, immediately upon enable we encountered errors (even user 1) on all pages.

These errors recur with small line number changes, as noted below. We are using;

Spaces 3.4 (most recent at this time)

Module Grants 3.8 (most recent at this time)


warning: array_fill() [function.array-fill]: Number of elements must be positive in path/to/drupal/includes/database.inc on line 253.
warning: implode() [function.implode]: Bad arguments. in path/to/drupal/includes/database.inc on line 253.
warning: array_keys() [function.array-keys]: The first argument should be an array in path/to/drupal/modules/user/user.module on line 515.
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 p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in path/to/drupal/modules/user/user.module on line 515.



Perhaps there is some remaining spaces/module grants interaction issue?

Any help would be appreciated.