I used the following rule with Rules 2.1 and Entity API rc1; it worked great. However, when I updated Entity API to rc3, the "Set a data value" action no longer works (the rules debug log shows the action being evaluated, but the value is not changed in the database). Reverting to Entity API rc1 allows the rule to work again. (I also tested with rc2; rc2 has the same problem-- the rule doesn't work.)

Here is the debug log:
0 ms Rule Profile Pictures- Set on User Flag fires.
4.272 ms Evaluating the action data_set. [edit]
6.154 ms Saved flagged_node:author of type user.

{ "rules_profile_pics_set_on_user_flag" : {
    "LABEL" : "Profile Pictures- Set on User Flag",
    "PLUGIN" : "reaction rule",
    "TAGS" : [ "approval" ],
    "REQUIRES" : [ "rules", "flag" ],
    "ON" : [ "flag_flagged_profile_picture" ],
    "IF" : [
      { "node_is_of_type" : {
          "node" : [ "flagged-node" ],
          "type" : { "value" : { "profile_picture" : "profile_picture" } }
        }
      }
    ],
    "DO" : [
      { "data_set" : {
          "data" : [ "flagged-node:author:field-acc-profile-picture" ],
          "value" : [ "flagged-node:field-acc-uploaded-picture" ]
        }
      }
    ]
  }
}

Comments

ptmkenny’s picture

Project: Flag » Entity Translation
Issue summary: View changes

added more detail about exactly what doesn't work

ptmkenny’s picture

Issue summary: View changes

updated debugging info

ptmkenny’s picture

Title: Flag and Rules: "flagged-node" no longer works properly upon updating to entity-rc3 » "Set data value" no longer works for images after updating to entity-rc3
Project: Entity Translation » Rules
Version: 7.x-2.0-beta6 » 7.x-2.1
Component: Rules integration » Rules Core

Possibly related to Action "Set a data value" is not working for date field.

Making this a rules issue since I was able to recreate the rule so that it is triggered every time a picture node is saved (no reference to flag) and it still doesn't work with entity-rc3 or rc2; reverting to rc1 allows it to work again.

EDIT: Sorry, I was unable to confirm this on a vanilla D7 install. I will debug more to find the cause of this issue.

ptmkenny’s picture

Title: "Set data value" no longer works for images after updating to entity-rc3 » Rules "Set data value" no longer works for images after updating to entity-rc3 with entity translation alpha2
Project: Rules » Entity Translation
Version: 7.x-2.1 » 7.x-1.0-alpha2
Component: Rules Core » Base system

I have confirmed this bug by re-creating the basic configuration (content type "picture" with image field, user profile image field, rule that "sets a data value" from the image field of content type picture to the user profile image field upon node save) on a clean install of D7 with the following modules:

Entity rc3
Entity Translation alpha2
Rules 2.1

If I revert entity from rc3 to rc1, "set a data value" works again.

Also, if I keep rc3 but disable entity translation, "set a data value" works.

plach’s picture

Status: Active » Postponed (maintainer needs more info)

Please, try the latest dev.

ptmkenny’s picture

Status: Postponed (maintainer needs more info) » Active

Sorry for the late response. I tested with the latest versions of the modules:

Entity rc3 / dev (2012-Jul-03)
Entity Translation alpha2 / dev (2012-Aug-15)
Rules 2.2

I still have the exact same problem. To remedy the situation, I can revert to entity rc1 or disable Entity Translation, but I can't use "Set a data value" in Rules without doing one or the other.

plach’s picture

Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Status: Active » Postponed (maintainer needs more info)

Please, confirm this still exists in the latest dev.

ptmkenny’s picture

Unfortunately, I am still able to reproduce the bug in the manner described in #2 with the following modules:

Entity rc3 / dev (2012-Oct-24)
Entity Translation dev (2012-Dec-11)
Rules 2.2

ptmkenny’s picture

Status: Postponed (maintainer needs more info) » Needs work
ptmkenny’s picture

Status: Needs work » Active
plach’s picture

Title: Rules "Set data value" no longer works for images after updating to entity-rc3 with entity translation alpha2 » Rules "Set data value" no longer works for images after updating to entity-rc3 with ET

Retitling

ptmkenny’s picture

Status: Active » Fixed

Using the release versions of the following modules, the error no longer occurs, so I'm marking this fixed:

Entity translation 1.0-beta2
Entity 1.0
Rules 2.2

plach’s picture

Status: Fixed » Closed (works as designed)

Thanks for reporting.

plach’s picture

Issue summary: View changes

actually, it works even for simple rules, so I will simplify my post