Trophy points -- Possible bug?

jrap

Joined Jun 25, 2006
1,125
There is still a problem. For instance, Wendy still has not received points for either the 2500 Post level or the 10,000 Post level while everyone else that I've checked that has passed those levels have received the points.

Perhaps it's just a matter of when the calculations are done. It could be that they are only updated when a person visits the site. That actually makes a lot of sense as a good compromise between recalculating them each time they are needed verses storing them in the database as they are awarded for quick lookup. If the system is configured properly then the only points that could go unawarded for any length of time would be the time-related points (5 years, yada yada). But that means that in this instance, anyone that will get more points as a result of this fix won't be awarded them (and, hence, no one else will see them) until they log in again.
From what I've read, trophy points are only recalculated for users that have been active within the past 24 hours. I suspect it's a way to reduce the number of database queries. When Wendy (or anyone else) logs in next time, their points will be adjusted that day.
 

WBahn

Joined Mar 31, 2012
30,060
From what I've read, trophy points are only recalculated for users that have been active within the past 24 hours. I suspect it's a way to reduce the number of database queries. When Wendy (or anyone else) logs in next time, their points will be adjusted that day.
That makes perfectly good sense. It's trivial to add users to a list as they log in and then, once a day, run a script that updates the profiles of everyone in that list with any new trophies that have been awarded and then clear the list.

Now I'm curious, though. What happens if someone earns a trophy, say for posting 30 messages, and then one of the messages is deleted (either by them or by a mod, perhaps because an entire thread is deleted or moved to Off Topic) and their post count drops below 30 messages? Do they lose the trophy? Or is a trophy, once earned, non-revocable? Either approach makes sense, but if it is not revoked, then the code base should ensure that they are not awarded another trophy when they pass 30 messages again. It would be an easy check to make, but also an easy thing to overlook.
 

jrap

Joined Jun 25, 2006
1,125
>Or is a trophy, once earned, non-revocable?

Yep, this. As well as if a trophy is deleted (say we removed the 5 year one), the points remain for those members that were originally awarded it.
 

WBahn

Joined Mar 31, 2012
30,060
>Or is a trophy, once earned, non-revocable?

Yep, this. As well as if a trophy is deleted (say we removed the 5 year one), the points remain for those members that were originally awarded it.
So do we know that a trophy won't be earned multiple times (when they bounce back and forth across an award threshold)?

If we don't know, I could make a dummy profile to test it out and, if multiple awards are made, we could feed that info back to XenForo.
 

djsfantasi

Joined Apr 11, 2010
9,163
I think I have seen the effects of the change. While I have over 2,600 posts, I was awarded, a moment ago, a trophy for 2,500 posts.

@WBahn, these scenarios are certainly an edge case and I would not be surprised if they never have happened. As a programmer, I would code the awarding of a 'trophy' such that it would not happen if it had been awarded before. Hence, the 'bouncing award' would not occur.
 

WBahn

Joined Mar 31, 2012
30,060
I think I have seen the effects of the change. While I have over 2,600 posts, I was awarded, a moment ago, a trophy for 2,500 posts.

@WBahn, these scenarios are certainly an edge case and I would not be surprised if they never have happened. As a programmer, I would code the awarding of a 'trophy' such that it would not happen if it had been awarded before. Hence, the 'bouncing award' would not occur.
Yes, it's an edge case. But then edge cases are where security vulnerabilities love to hang out. Writing the code so that the bouncing award can't happen is easy to do -- provided the person writing the code considered the possibility of a bouncing award occurring in the first place. Edge cases are often overlooked and it is the behavior of edge cases that hackers look for in trying to develop an exploit. Most such cases end up offering no crack to take advantage of (and it's hard to imagine that this one would, even if it exists) -- but history is replete with successful exploits of things that people were amazed could actually be exploited.

In this case, if this bug exists, then the most likely worst-case breach would be someone being able to pump up their trophy points artificially. That might piss a few people off, but for the most part it would be a very benign hack that most people wouldn't even notice or care about if they did.
 

WBahn

Joined Mar 31, 2012
30,060
I think I have seen the effects of the change. While I have over 2,600 posts, I was awarded, a moment ago, a trophy for 2,500 posts.

@WBahn, these scenarios are certainly an edge case and I would not be surprised if they never have happened. As a programmer, I would code the awarding of a 'trophy' such that it would not happen if it had been awarded before. Hence, the 'bouncing award' would not occur.
My guess is that it is taken care of already, but very possibly not as a result of actually considering the case, but rather as an unintended side effect of the most obvious way of making the awards in the first place, which is to determine which awards the person is eligible for and then only adding the ones that have not already been awarded.
 

Thread Starter

Hypatia's Protege

Joined Mar 1, 2015
3,228
@WBahn & @jrap

Many thanks for your efforts! Not only do I now have my 30 'Starbucks points';) - But it seems I'm now 'distinguished':D


Re: the significance of trophy points:

Wendy said:
I'm not sure why trophy points exist, but whatever.
Wondering the above myself too.
IMO it's not the trophy points per se but, rather, said system's role in 'triggering' promotions:) -- Petty though it may sound, I feel promotions are important for their significance 'in the eyes' of other participants -- especially newcomers/'visitors' to these fora in search of consultation/instruction ---- Granted! - As with most conventions akin to or parallel with 'protocol' - 'Credentialism', etc... is indeed 'silly' in the abstract -- Still, there it is:cool:

Very best regards
HP:)
 

WBahn

Joined Mar 31, 2012
30,060
My basic view is twofold:
(1) Whether we do it or not is beside the point, the implementation should be correct regardless.
(2) If we ARE going to do something, then it should be done correctly regardless of how "silly" it may or may not be.
 

JohnInTX

Joined Jun 26, 2012
4,787
@WBahn Agreed.
I personally couldn't give a rat's patoot about all/any/none of the allocades. If I can't spend it or eat it... meh. But if it's in place, it should work. That said, meanwhile we mods tirelessly toil away with nothing but 'Moderator' to show for it...

Awww, heck. Who are we kidding? The DELETE button makes up for all of that. BWWWAAAHAHA! :D
 
Last edited:

WBahn

Joined Mar 31, 2012
30,060
@WBahn Agreed.
I personally couldn't give a rat's patoot about all of the allocades. If I can't spend it or eat it... meh. But if it's in place, it should work. But meanwhile, we mods tirelessly toil away with nothing but 'Moderator' to show for it...

Awww, heck. Who are we kidding? The DELETE button makes up for all of that :D
ROTFLMAO!
 

KL7AJ

Joined Nov 4, 2008
2,229
Kind friends

I has come to my attention that my post count now exceeds 2,500 counted posts -- Inasmuch as said count must have been attained several hours ago, it seems the 2,500 post trophy is not working?...

While 'no big deal' on the face of it - I feel, inasmuch as 'minor symptoms' are often harbingers graver issues, this should be reported... Moreover, while 30 trophy points are, IMO, irrelevant - 'rank promotion' (if applicable) is nice (albeit non-essential) for its perception as a 'measure of integrity' (in the eyes of many)...

Many thanks!

Best regards
HP:)
I can send you a gold plated garden gnome. Will that suffice?
 

JohnInTX

Joined Jun 26, 2012
4,787
Actually, I'd prefer a real garden gnome. I have no idea what I would do with it but.. I mean, geeze.. a gnome!
 
Last edited:

Thread Starter

Hypatia's Protege

Joined Mar 1, 2015
3,228
My basic view is twofold:
(1) Whether we do it or not is beside the point, the implementation should be correct regardless.
(2) If we ARE going to do something, then it should be done correctly regardless of how "silly" it may or may not be.
Agreed! -- And please don't think I was disparaging said features! -- To be clear, I feel the promotion (i.e. 'User Rank') feature is important beyond any 'incentive value' attendant thereto (as explained in my other posts on this thread) -- My use of the adjective 'silly' was merely with reference to our species' "fondness" for protocol in general - The fact that 'status matters' (right or wrong) is more than sufficient justification for its implementation!:cool: --- Sincere apologies should my philosophical musings have created the wrong impression!:oops:

Awww, heck. Who are we kidding? The DELETE button makes up for all of that :D
;):D

Very best regards
HP:)
 
Last edited:
Top