I've noticed every once in a while that the node create on radioactivity tries to fire before new nodes are completely made. I think this patch below will fix this screenshot:

Screenshot_10_3_13_4_40_PM.png

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

japerry’s picture

Status: Active » Needs review
Issue tags: +Commons 7.x-3.4 radar
FileSize
966 bytes

Patch

ezra-g’s picture

Status: Needs review » Reviewed & tested by the community

Looks reasonable to me.

japerry’s picture

Status: Reviewed & tested by the community » Fixed

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

WebSinPat’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

setting back to active....sorry....

I have applied the patch but I just now still got the error message when creating a node.
Only difference is now the error message is for line 132, which is where the reference is now after the patch was applied.

Notice: Undefined index: und in commons_radioactivity_incident_node() (line 132 of /usr/www/users/incite/incite7/profiles/commons/modules/contrib/commons_radioactivity/commons_radioactivity.module).

Devin Carlson’s picture

Status: Active » Postponed (maintainer needs more info)

@WebSinPat The patch has been committed and is in Commons 7.x-3.4; you shouldn't have to apply it.

Can you confirm the version of Commons you are using?

WebSinPat’s picture

Ah sorry @Devin Carlson, I forgot to specify I am still on commons 3.3.
Are there other changes other than what's in the patch in #1 needed for this fix?

BarisW’s picture

Status: Postponed (maintainer needs more info) » Needs work

Even with 3.4 I'm still getting this notice for some nodes that do have the field, but without a value.

Changing the line from:

<?php
if (!isset($node->field_radioactivity)) {
?>

to

<?php
if (empty($node->field_radioactivity)) {
?>

fixes the issue.

BarisW’s picture

Status: Needs work » Needs review
FileSize
591 bytes

Here's a patch.

japerry’s picture

Assigned: Unassigned » japerry
japerry’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

cosineBob’s picture

Status: Closed (fixed) » Active

I am running Commons 7.x-3.17. It is a new install, no upgrades. I am suddenly getting this same error message.

Notice: Undefined index: und in commons_radioactivity_incident_node() (line 104 of /var/www/drupal4/profiles/commons/modules/commons/commons_radioactivity/commons_radioactivity.module).

Not sure where it came from or why.

scottzak’s picture

I can confirm issue occurs on Commons 7.x-3.17 on our existing system upgraded a couple of weeks ago. This happens when adding a new node (group content) to a group. The field_radioactivity key is set in the group node object (checked on line 99), but it points to an empty array so field_radioactivity[LANGUAGE_NONE] returns the message shown.

Backtracking up the call stack, I'm finding that the call to node_load_multiple() in function commons_radioactivity_groups_incident_groups() returns group objects with an empty array for field_radioactivity. There are data rows in the DB with values for that group. All other fields appear to be correctly populated.

What's special about field_radioactivity on a group node?

a1mpreza’s picture

I am also getting this message when trying to create a post.

I am on a fresh install of 7.x-3.17.

Notice: Undefined index: und in commons_radioactivity_incident_node() (line 104 of profiles/commons/modules/commons/commons_radioactivity/commons_radioactivity.module).

alisoncc’s picture

I am on a fresh install of 7.x-3.18 and getting the same error message occasionally. Doesn't seem to be easily reproduceable.

alisoncc’s picture

How does one re-open a closed issue.

I seem to be getting an increasing number of messages per

"Undefined index: und in commons_radioactivity_incident_node() (line 104"

of late, and that's in the latest release 3.20 of Commons.

webadpro’s picture

I am also getting those error :/

sdstyles’s picture

I have this issue on Commons 7.3.20 too, warning appear because radioactivity field is empty.
Here's a patch.

eleuthere’s picture

I checked that patch : 2105133-radioactivity-notice-19.patch on Commons 3.17 and it worked at least once.
# cd /site directory/profiles/commons/
# patch -p1 < /path to patch directory/2105133-radioactivity-notice-19.patch
patching file modules/commons/commons_radioactivity/commons_radioactivity.module

When I created a new post, I had no more error message.

TuWebO’s picture

Status: Active » Needs review

Patch in #19 worked for me to.
Thanks @sdstyles .

Devin Carlson’s picture

Status: Needs review » Fixed

Restored the fix from #9.

  • Devin Carlson committed bc4a7f6 on 7.x-3.x
    Issue #2105133 by Devin Carlson: Restored a fix to prevent PHP notices...

Status: Fixed » Closed (fixed)

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