I have installed OG Notifications just now and get the following error for every node displayed
Warning: array_pop() expects parameter 1 to be array, string given in Og_Notifications_Subscription->set_group() (regel 30 van /usr/home/debxxxxx/domains/rsvnet.nl/public_html/sites/all/modules/og_notifications/og_notifications.inc).
I deinstalled and reinstalled to no avail.

CommentFileSizeAuthor
#6 patch.txt618 bytesrishi_cs357

Comments

edvanleeuwen’s picture

Status: Active » Closed (works as designed)

My mistake, sorry. I did not use the proper combination of OG and OG Notifications.

yarroha’s picture

Status: Closed (works as designed) » Needs work

Could be, but it shouldn't show You any php errors when you setup something wrong.
Could You provide more information about your OG settings when you got this error, please?
Suppose You didn't set any group for a node, and got this error when had opened this node page. Am I right?

edvanleeuwen’s picture

Could You provide more information about your OG settings when you got this error, please?

I have a field added to each content type to give the context of the content. This field is multiple and mandatory. I have not changed the settings after I upgraded.

Suppose You didn't set any group for a node, and got this error when had opened this node page. Am I right?

No, most of the nodes had already set a group for a node. I now get the message infrequently and then I do have to add the group.

Does this help you?

deanflory’s picture

I'm getting these errors on the /node home page now:

Warning: array_pop() expects parameter 1 to be array, null given in Og_Notifications_Subscription->set_group() (line 30 of /home/account/public_html/drupal/sites/all/modules/og_notifications/og_notifications.inc).

Warning: array_pop() expects parameter 1 to be array, null given in Og_Notifications_Subscription->set_group() (line 30 of /home/account/public_html/drupal/sites/all/modules/og_notifications/og_notifications.inc).

Notice: Undefined index: title in _popup_menu() (line 488 of /home/account/public_html/drupal/sites/all/modules/popup/includes/popup.api.inc).

Notice: Undefined index: #id in popup_descriptions_preprocess_form_element() (line 69 of /home/account/public_html/drupal/sites/all/modules/popup/modules/popup_descriptions/popup_descriptions.module).

Organic Groups: 7.x-2.0-alpha3
Organic Groups Notifications: 7.x-2.0-dev

socialnicheguru’s picture

I am getting this too.

line

$gid = array_pop(array_pop(og_get_entity_groups('node', $node)));

og_get_entity should be checked to see if it returns a real value.

in my case -
I had a content type that is a group type
I was able to save the content type without the manditory group setting (I think I was testing overlay or lightbox2 node creation).

rishi_cs357’s picture

StatusFileSize
new618 bytes

Hello everyone,
I also have faced the same problem.There is two times array pop() function has been used. Remove one of them....Here is the patch...

Rishi
ASP Global Works, India

seddonym’s picture

Just to reiterate, the most likely cause of this problem is using the wrong combination of OG and OG Notifications. As per the module home page:

Compatibility

7.x-1.x works fine with OG7.x-1.x.
7.x-2.x works fine with OG7.x-2.x.

edvanleeuwen’s picture

This error has reappeared in my current configuration.

Versions used:

  • Organic groups 7.x-2.0-beta4
  • Organic Groups Notifications 7.x-2.x-dev (2012-apr-20)
  • Notifications 7.x-1.0-alpha2

I do not know if this is the cause of the fact that now only one of my messages will be sent:
Sent event Node post to 67 subscriptions: 1 success, 0 errors, 66 skipped.

mxr576’s picture

Status: Needs work » Closed (duplicate)

I've published a patch here, that may solved that problem too.

mxr576’s picture

Issue summary: View changes

Removed domain user data.