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.
In user_stats.rules.inc - the type for the uid, is listed as 'number' by default. This will fail rules validation since there is no 'number' type resulting in a catastrophic fail for running rules based on user stats.
Switch to 'integer' and all is well.
Comments
Comment #1
Bastlynn CreditAttribution: Bastlynn commentedWell, mostly fine.
In addition, the value for uid isn't passed in in quite the format expected. This needs to be changed as well:
function user_stats_events_argument_user($uid, $value) {
return user_load($uid['uid']);
}
Without this change, the entity load will throw a fit about not having $ids as a string or integer, since an array is getting passed in otherwise.
FWIW this is against Rules version 7.x-2.3
Comment #2
mermemladeK CreditAttribution: mermemladeK commentedHey Bastlynn,
I cannot so far execute rules when post count is increased, decreased or reset. I am trying your fix but no success so far.
One thing I never manage to solve either and I never got an answer from the mantainers of this module, was how to retrieve the post count number from a user.
Along your reasoning I was thinking maybe I should apply also change 'number' to 'integer' in here:
I tried this but so far it's not working.
What do you think?
PS: I think I'm just gonna add some post_count fields and remove User Stats because so far this module has been more of a pain than anything else!