Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Line 115 of userpoints_nc.module, the 'operation' you use for $op = 'delete' in hook_nodeapi is "operation" (it should be 'delete').
Current:
case 'delete':
if (variable_get(USERPOINTS_POST . '_undo_points_on_delete', true)) {
$points = -$points;
$params = array(
'points' => $points,
'uid' => $node->uid,
'operation' => 'operation',
'entity_id' => $node->nid,
'entity_type' => 'node',
);
userpoints_userpointsapi($params);
}
break;
Should be:
'operation' => t('delete')
Comment | File | Size | Author |
---|---|---|---|
#4 | userpoints_nc-875140.patch | 471 bytes | quotesBro |
#1 | userpoints_nc-fixed-delete-operation-label.patch | 449 bytes | mstef |
Comments
Comment #1
mstef CreditAttribution: mstef commentedPatch
Comment #2
ezra-g CreditAttribution: ezra-g commentedMarking as "needs review".
Comment #4
quotesBro CreditAttribution: quotesBro commentedPatch for Git
Comment #6
quotesBro CreditAttribution: quotesBro commentedpatch against dev
Comment #7
quotesBro CreditAttribution: quotesBro commented#4: userpoints_nc-875140.patch queued for re-testing.
Comment #8
quotesBro CreditAttribution: quotesBro commentedComment #9
BerdirThanks, commited.