When a user follow or unfollow a post the commons_radioactivity_flag() function verify if the user is the owner of the content but in that function is used a undefined $node object causing "notice" errors.

Right now the "follow" event is using ajax so the notice error is not displayed but if is turned off the javascript you will can see the error.

This issue affect #1816536: Automatically follow nodes where the user comments or the user created because in that case the "follow" event is do it programmatically so this error is displayed even with the javascript turned on

As i understand should be necessary add a node_load using the $content_id before to use $node and in the conditions change the $node->nid and use $node->uid (for check the user).

I will provide a patch for fix this issue (if no one provide one before).

Members fund testing for the Drupal project. Drupal Association Learn more


gnuget’s picture

Assigned: Unassigned » gnuget
Status: Active » Needs review
1.24 KB

Patch attached.

ezra-g’s picture

Status: Needs review » Fixed

Looks like the right fix to me - Thanks, gnuget!


Status: Fixed » Closed (fixed)

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