Warning on line 273

attiks - January 5, 2009 - 09:10
Project:Subgroups for Organic groups
Version:6.x-0.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

I get the following warning, but all seems ok if I select the parent group manually while creating a subgroup.

warning: array_values() [function.array-values]: The argument should be an array in C:\sites\drupal66\sites\all\modules\og_subgroups\og_subgroups.module on line 273.

#1

attiks - January 5, 2009 - 09:15

If I don't select a parent book, the node got created, but doesn't get attached to the parent.

#2

Amitaibu - January 5, 2009 - 20:17
Status:active» postponed (maintainer needs more info)

I didn't understand the scenario - can you attach a screenshot of your settings.

#3

attiks - January 6, 2009 - 12:02

I have a link 'create subgroup' like this node/add/og_user_roles_subgroup?gids[]=231 which redirects to node/ognodeadd?type=project&gids[]=231

On that page I can select the book to which this node will belong:
- if I select the parent group I get the error message but the outline is good
- if I don't select the parent group I get a node which doesn't belong to a group and I have to use the 'outline' link to fix it.

I hope it's a clear now

#4

Amitaibu - January 6, 2009 - 13:01

By the link I think you use og_role. Please disable it and try again. Again, a screenshot will make it more clear,as I'm unable to reproduce.

#5

attiks - January 6, 2009 - 14:08

You're 100% right, I'll check their issue queue

#6

seutje - March 12, 2009 - 16:02

I just got the same error after disabling the access right for "administer book outlines"

before I disabled that I wasn't getting the error and I'm not getting the error on UID1

however, when I get the error, nothing went wrong... the outline is correct and everything

considering this happens in the propagate helper function, I suppose it might be usefull to share my propagate settings:

group post propagation: none

user propagation:

direction: parent
admins propagation: Don't propagate admin rights, only membership

Rights demotion: none

hope this helps

#7

DanielTheViking - March 15, 2009 - 07:18

Subscribing.

#8

seutje - March 19, 2009 - 08:21

might of fixed the issue by replacing lines 273 & 274:

<?php
$mlid
= array_values($node_links[$gid]);
$mlid = $mlid[0]['mlid'];
?>

with

<?php
$mlid
= $node->book['mlid'];
?>

but am yet to fully test if this leads to desired behavior

#9

seutje - March 19, 2009 - 08:33

tiny patch for HEAD

it gets the mlid in a more reliable way I suppose

AttachmentSize
og_subgroups.module.patch 796 bytes

#10

seutje - March 19, 2009 - 08:33
Status:postponed (maintainer needs more info)» needs review

forgot to change status

 
 

Drupal is a registered trademark of Dries Buytaert.