1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 Warnings not working properly

Discussion in 'XenForo Questions and Support' started by Gambleru, Dec 6, 2013.

  1. Gambleru

    Gambleru Member

    There were malfunctions in 1.1, recently upgraded our large forum to 1.2.3.
    Warning system seemed to function normally, yet:
    - With 7 warning points user is banned for 1 week
    - With 10 warning points user is set to be blocked until warning points expire

    Idea is: When user acquired 7 points over time, he's banned for a week, if he's continuously not cooperating after his return and gets additional warnings over time, he's banned as soon as he's collected 10.

    But in reality it somehow misfires:
    User had:
    - 1 warning, expiration 27 nov. 2014.
    - got additional 9 points, expiration 27 dec. 2013

    So he should have remained banned until 27 dec at least.
    Yet, a week later his ban was somehow lifted and the user is posting again.

    How is that possible and how can we fix this?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    How many points does the member have now, what are the thresholds and the warning actions?
  3. Gambleru

    Gambleru Member

    User still has the warning points mentioned above.
    Tresholds are the same as described above, nothing changed.
  4. Mike

    Mike XenForo Developer Staff Member

    I'm looking at the code and it looks like it should process this correctly. The one week ban should be processed before the indefinite (points threshold) ban, though if it happened the other way, the code appears to handle that as well.

    Unfortunately, it will be hard to detect what's going on after the fact. The data in question would be removed. I'd have to see if I could reproduce this specifically to attempt to debug it.
  5. Gambleru

    Gambleru Member

    I'd say it should be easy to reproduce:
    - Create 2 warning tresholds:
    20 points = ban until warning points are valid
    15 points = ban of 1 day

    Give 20 points to user, set expiration for 1 day (24hrs) and see what happens.
    If it misfires as it does with us, user will be deblocked after 1 day and there should be a fix for it. If works as intended, then the problem is with our forum and I'd like to see a solution to it as well, since it's a stock forum, no alterations have been made to the code whatsoever.

    P.S.: On our forum, I removed the 7 points warning measure, recounted everything - user with 10 points was still not banned. Added 1 more warning point to his warnings (11 in total of 10 points treshold) and he was banned again instantaneously. Go figure...
  6. Gambleru

    Gambleru Member

    P.P.S.: I urge you to try to simulate it locally on your machine, since I cannot experiment like this on a live forum.
  7. Gambleru

    Gambleru Member

  8. Mike

    Mike XenForo Developer Staff Member

    I have not tested this yet and if there is an issue, it would only be fixed in the next update at the earliest. You appear to have worked around it in this case, which is really all we could recommend doing at the moment.
  9. Gambleru

    Gambleru Member

    No, I have not, since the only solution is to remove all but one warning reaction (as the lowest would seemingly always cancel the rest) means that warning system is as good as useless. I'm not really keen on experimenting with live forum with almost 4k users, but we do need a working solution for crowd control. :)
  10. Mike

    Mike XenForo Developer Staff Member

    FWIW, I have tested this and been unable to reproduce it. The ban appears to be permanent and "triggered" and there is a trigger to remove the ban (though not until the first timed one would handle it). This is consistent with how bans based on points thresholds work.

    Presumably the issue only potentially comes up if you go from < 7 to >= 10 points in one go (though that's what I tried without issue). If you give a person 8 points, when is their ban scheduled to be lifted? If you give than an additional 2, does it now saw it's permanent? (It should; that's how the threshold action works.)

Share This Page