XF 2.2 User Promotion problem

Ludachris

Well-known member
To not hijack the other thread where I posted a reply, here's a new thread...

I want to make sure I don't have any conflicting promotions. I had one in place for many years and now added 3 more. Before doing so I created 3 more usergroups.

Promotion 1 (original promo) - checks to see if the user has X posts and X days registered and adds them to a new usergroup. Additional checks include if the user state is Valid and the belong to the Registered usergroup (to weed out any who are in the Users Awaiting Confirmation usergroup), and also checks to make sure they're not in any of the usergroups specified in the new promotions, in hopes of avoiding any promotion conflicts:

Promotion 2 - checks to see if the user has X posts and has been registered XX days and adds them to the same usergroup as above, plus one of the new usergroups. The new usergroup just gives them a fancy user title with higher priority, specifying how long they've been a contributing member.

Promotion 3 - checks for an even longer time registered and applies another user title.

Promotion 4 - checks again for an even longer time registered.

Is anything I'm doing creating a conflict between promotions? I ask because one of the members who was showing up yesterday as being promoted via one of the new promotions was removed from all of them, even though he qualifies for them. I figured maybe it was due to a conflict.
What I have happening is that members who should be part of the Promotion 4 keep getting caught in the Promotion 2. The Promotion 2 is for 10+ years registered and XX posts. The Promotion 3 is 15 years registered and more posts. The Promotion 4 is 20 years and more posts. There is no way to limit the days registered so that the user has been registered no more than X days in the promotion, so I'm just setting Promo 2 to not apply the promotion when the users are part of usergroups set for Promo 3 and 4. But that doesn't seem to be working. What's the right way to do this?
 
Is there a way to give user group promotions priority, or use a weighting system? Seems like that would easily solve this problem. This way the promotion that runs last in the cron job would be the one that affects users in promotion 4, in this situation.

Or, if there were a maximum days registered criteria, that would help too.
 
Last edited:
Did you by chance rebuild your user group promotions in the ACP? I had to do that after I had a promotion that wasn't running for people. It was one that required to be a registered member for 3 days and have made at least 5 posts to allow them access to the Classifieds area.
 
I've always worked in series, meaning, i only promote from 1 group to the next group. It may take 4 days to get there first time around but once it's up, it will work.

So, make your 10 year promotion:

User is a member of any of the selected user groups:
  • registered

and then your 15 year promotion

User is a member of any of the selected user groups:
  • 10 year


and so forth, so it only picks from the previous level.
 
Did you by chance rebuild your user group promotions in the ACP? I had to do that after I had a promotion that wasn't running for people. It was one that required to be a registered member for 3 days and have made at least 5 posts to allow them access to the Classifieds area.
I did that at the end of adding them all. But the next morning I found users with the wrong titles and the promotion history showed they went through multiple promotions and ended up in the wrong one. I've made some changes since that seem to be working but I'll have to do some more checks.
 
I've always worked in series, meaning, i only promote from 1 group to the next group. It may take 4 days to get there first time around but once it's up, it will work.

So, make your 10 year promotion:

User is a member of any of the selected user groups:
  • registered

and then your 15 year promotion

User is a member of any of the selected user groups:
  • 10 year


and so forth, so it only picks from the previous level.
I think I tried that, but I also had other criteria set too, which likely screwed things up. If the settings I have now fail I'll try it that way. At the moment I have it stripped down to check that they're part of the Registered user group, plus a check for days registered, with each promotion using the appropriate number of days. I stripped out the post count and the other checks. So what it's doing is adding them to all the usergroups that apply based on how long they've been registered, which then puts the usergroup display styling priority in play. That works.
 
Just to confirm - if you select multiple criteria, like number of posts and days registered, that means ALL have to be true, not just any one of them, correct? I've always assumed it uses AND, as opposed to OR for the criteria.
 
And another question - let's say you need to wipe all promotions to start over for everyone (removing them from the usergroups that the promotions added them to). Do you have to delete the promotions, rebuild the cache for that, then recreate them and rebuild the cache again?
 
Last edited:
This is so frustrating.

In order to start fresh, I used the Batch User Update tool and removed everyone from specified user groups that are targeted in the User Group Promotions. I then rebuilt the user group promotions cache. I then ran the cron for user group promotions. Now my first promotion isn't working as it was before. People who should be promoted are not getting promoted. What do I do now?

The first promotion is User State: Valid, Has at Least 30 Posts, Has Been Registered for at Least 30 Days. If all those things are true, the user should be added to a usergroup. I've run checks on users who have been active today and meet the criteria, and they are not being promoted. What gives?

I'm going to start getting PMs about this now that people are not in the usergroup they should be in.
 
Anyone have any advice? I've tried a few things but I cannot get the promotion to work. What would prevent members from being eligible for a promotion after being removed from a user group using the Batch User Update?

Also, I tested this by using the Batch User Update and searching for users who are NOT in the usergroup they should be in and meet the promotion criteria (they have X posts and X days registered) and found over 14k members who should be promoted. I could just use the Batch tool to add them to that secondary usergroup, but the question still remains - why aren't they being added with the promotion?
 
After running the cron multiple times yesterday and not having promotions get applied, I see that some of them got applied this morning. I don't understand why.
 
I know this is an off-the wall suggestion... but have you restarted your HTTP server and the PHP processor as well as any additional caching you may have going on?
 
Top Bottom