Spaces is -1. Og is 0. Spaces does it's menu alter. Og is does it's.

Bam, access callback for node/%node/edit is og_menu_access_node_edit instead of spaces_access_menu, so linking to node/%node/edit fails with patch for #936234 active (Tabs would trigger redirect, as it'd test access to the tab, so despite not being at that tab it would redirect).

This is the second time I've had issues with contrib modules running after spaces's menu alter (views unpublished for node/%node/view), making spaces_access_menu disappear. I think the menu alter runs too late and the weight should be at least 1 . I know there is a reason for it being -1, but I don't know why (I believe it was mentioned to me at some point, but forgot).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hefox’s picture

Status: Active » Needs review
FileSize
842 bytes

Here's a quickie patch.

Grayside’s picture

Settings pre-patch:

Weight Name Version
-1 Spaces (spaces) 6.x-3.0-beta6
1 Spaces OG (spaces_og) 6.x-3.0-beta6
-19 Spaces User (spaces_user) 6.x-3.0-beta6

Wouldn't bad things potentially happen with Spaces and Spaces OG sharing a weight?

hefox’s picture

Ye, spaces_og_menu_alter needs to run after spaces_menu_alter to alter the items spaces_menu_alter adds, however there's a flaw in with that menu alter that #936234: call to router during menu access check causes infinite loop reveals; node/%node/features doesn't redirect (it was relying on other local tasks to redirect).

    $items['node/%node/features']['access callback'] = 'spaces_og_access_admin';
    $items['node/%node/features']['access arguments'] = array(1);

edit: Appreantly I meant to say more, and left a "However," at the bottom. I don't remember what I was going to say.

tylor’s picture

Status: Needs review » Needs work

I also noticed that you need to make sure boxes runs after spaces or you get a WSOD (seems that the spaces_controller class isn't loaded for spaces_controller_boxes).

hefox’s picture

Status: Needs work » Needs review
FileSize
4.07 KB

Here's one with spaces_og.install.

Can ya make a patch for boxes?

(Let's see if my attempt to add a file via patch works...)

Dane Powell’s picture

FileSize
4.36 KB

How has this been sitting here for so long? I was having a problem where trying to edit the Features for a Space result in access denied- adjusting the weights as in the patch above fixed the problem.

Unfortunately that patch will not apply for whatever reason. Here's an updated patch, with a couple of typos fixed.

Dane Powell’s picture

Status: Needs review » Needs work

Ah- just noticed #4. Indeed, the patch needs to update the weight of boxes to be heavier than spaces, else you get a nasty error.

Dane Powell’s picture

Version: 6.x-3.0 » 6.x-3.2
Category: feature » bug

This is a bug, and I think still an issue with 6.x-3.2...

mbria’s picture

I found the issue in a clean OpenAtrium 1.1 installation.

Sorry but I missed myself in the discussion...

Setting this order (weight in brackets) it need to work, isn't it?
og (0) > spaces (1) > spaces_og (2) > spaces_user (3) > boxes (4)

Thanks,
m.

munyiva’s picture

Tried #9 lets see if it works

munyiva’s picture

#9 doesn't seem to work my site has over 50,000 nodes and the rebuild permissions error keeps reappearing.