Postponed (maintainer needs more info)
Project:
Boxes
Version:
6.x-1.0-beta6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Jun 2010 at 11:37 UTC
Updated:
14 Sep 2010 at 13:14 UTC
Sorry, this is a very rough and ready post and there is probably a better way of dealing with this, but just so *someone* knows about this bug before I forget, I began seeing this error after upgrading to the latest version of boxes:
warning: Missing argument 2 for boxes_spaces_dashboard_block_access_alter() in ~/profiles/openatrium/modules/contrib/boxes/boxes.module on line 337.
Changing line 337 from:
function boxes_spaces_dashboard_block_access_alter(&$access, $block) {
... to:
function boxes_spaces_dashboard_block_access_alter(&$access, $block = NULL) {
Has fixed the problem temporarily. For completeness, I added an is_object check around the function itself to avoid errors, so the resulting code is now (from line 337):
function boxes_spaces_dashboard_block_access_alter(&$access, $block = NULL) { // <-- " = NULL" has been added here
if (is_object($block)) { // <-- this entire line has been added
if ($block->module === 'boxes') {
// This is the add block, give access to admins.
if ($block->delta === 'add') {
$access = boxes_access_admin();
}
// If this box is specific to the current space, allow access.
else if (module_exists('spaces') && $space = spaces_get_space()) {
$in_space = $space->controllers->boxes->get($block->delta, 'space');
$access = $access || !empty($in_space);
}
// Outside of spaces, give admins access to all boxes.
else {
$access = boxes_access_admin();
}
}
} // <-- this entire line has been added
}
Would it be worthwhile adding this in to head?
Alex
Comments
Comment #1
jmiccolis commentedWhat version of spaces are you running? How could I go about reproducing this bug?
Comment #2
jmiccolis commentedStatus update.
Comment #3
verikami commentedi've got the same error on managingnews-1.0-beta9
switching from: spaces-6.x-3.0-beta3
to: spaces-6.x-3.0-beta4
...but without touching 'boxes'...
it disappeared when going back to beta3, so we (You ;-) could look there to find what's this incompatibility about
cheers
Weronika
Comment #4
sirkitree commentedI'm getting this after upgrading an older version ... line 458, so something to do with
boxes_spaces_dashboard_block_access_alter(). a var_dump of $access which is passed by reference to this is printing a boolean, not an array.