Situation
I'm using Rate and rate expiration module set to override expiration date for each node. After nodes are created, if admin do a bulk update on these nodes, the rate expiration date for each node gets reset and the row saved in rate_expiration database table gets deleted. I'm guessing this is not an expected behavior?

Problem
At rate_expiration.module line 254. [rate_expiration_node_update() hook] if begin and end are empty, db_delete is triggered. As commented inside the function, this deals without the "allow override" option, so, if you ARE using override, these values may come empty and your db line will be deleted.

Here's what I've done

if (empty($begin) && empty($end)) {
      if($widget->expiration_allow_override == '1'){
        drupal_set_message('Allowing override (delete rate expiration dates for this node was skipped)');
      } else {
        db_delete('rate_expiration')
          ->condition('nid', $node->nid)
          ->condition('widget_name', $widget->name )
          ->execute();
      }

Is this makes sense? Hate changing modules, but i hope to see a solution on this.

Comments

Pierre Maciel created an issue. See original summary.

ivnish’s picture

Status: Active » Closed (outdated)

Drupal 7 is EOL. Issue will be closed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.