Project:Organic Groups - Multiple Mandatory Groups by Role
Version:6.x-1.3
Component:Code
Category:bug report
Priority:normal
Assigned:tjsaker
Status:closed (fixed)

Issue Summary

Administer > Organic Groups > Multiple mandatory groups by role > Available Groups: Attempting to delete an existing assignment fails with the following error report:

warning: Illegal offset type in unset in C:\Documents and Settings\TJS\My Documents\per\development\workspace-PER\AW\site\sites\all\modules\og_multiple_mandatory_groups_by_role\og_multiple_mandatory_groups_by_role.module on line 783.

Comments

#1

The attached patch file fixes the delete issue and other minor issues as follows:

- Can't delete existing assignments
- Assignment process should report the user and group names instead of ID's

To apply the following patch:

- Place it in the module directory
- Shell and cd to the module directory
- Issue patch command: patch < og_multiple_mandatory_groups_by_role.20090915.patch

AttachmentSize
og_multiple_mandatory_groups_by_role.20090915.patch 11.64 KB

#2

+1 worked for me

#3

Works great for me on with php 5.3

#4

Status:patch (to be ported)» fixed

Looks like my day job has brought me back to Drupal, and as it turns out I need this module. I'll be updating it with the contributed patches. One note on this patch that I see right away is that Drupal convention (unless they changed it) is to have a comma on the last item in an array, but this patch doesn't do that.

Anyway, I'm applying the patch to 6.x and marking this as fixed.

I'm not applying the following section though, since I don't see that it does anything.

@@ -748,10 +765,11 @@ function theme_og_multiple_mandatory_gro
/**
  * Returns a confirmation page for deleting a group from the mandatory group availability table.
  *
+ * @param array $a API array.
  * @param integer $gid Value of group to be deleted; passed in from path.
  * @return array $form The GID is passed to the submit.
  */
-function og_multiple_mandatory_groups_by_role_group_confirm_delete($gid= NULL) {
+function og_multiple_mandatory_groups_by_role_group_confirm_delete($a,$gid=NULL) {
   if ($gid == NULL) {
     drupal_goto('admin/og/og_multiple_mandatory_groups_by_role/groups');
     return;
@@ -795,10 +813,11 @@ function og_multiple_mandatory_groups_by
/**
  * Returns a confirmation page for deleting a group from the mandatory group availability table.
  *
+ * @param array $a API array.
  * @param integer $gid Value of group to be deleted; passed in from path.
  * @return array $form The GID is passed to the submit.
  */
-function og_multiple_mandatory_groups_by_role_group_confirm_delete_unsubscribe($gid= NULL) {
+function og_multiple_mandatory_groups_by_role_group_confirm_delete_unsubscribe($a,$gid=NULL) {
   if ($gid == NULL) {
     drupal_goto('admin/og/og_multiple_mandatory_groups_by_role/groups');
     return;

#5

Status:fixed» closed (fixed)

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

nobody click here