1.9.0 Released

A few moments ago I released WordPoints 1.9.0. This version includes various improvements of existing features.

One of the biggest changes in this release is that the Post Delete and Comment Removed hooks are now deprecated. If you are upgrading from an older version, don’t worry; you’ll still be able to use them. But they will be completely hidden on new installs. To take their place, the Post and Comment hooks now automatically reverse any points transactions when a post or comment is deleted, respectively. This is the same behavior as the Comment Received hook, which was introduced in 1.8.0.

There are several reasons for this change. Before I explain it, let me first give you a little history. Back in 1.0, the Post Delete and Comment Removed hooks didn’t exist. Instead, the Post and Comment hooks had a second setting for the number of points to remove when the post/comment was removed. This was similar to what we have in 1.9.0, though there are some differences which I explain in a moment. Then, in 1.4.0, the Comment Removed and Post Delete hooks got split off. This was done as part of the background work for the introduction of the [wordpoints_how_to_get_points] shortcode. However, it was really misguided, because the Comment Removed and Post Delete hooks probably shouldn’t be listed in that table anyway. Their purpose is to make it easier to combat spammers, and in that table they are just extra noise. It also meant that you now had to configure twice as many hooks to achieve the same thing as before.

The real problem with the Comment Removed hook though, was the way that it interacted with the Comment hook. Because of the way they worked together, a user could leave a genuine, non-spam comment and end up actually loosing points for it. This would only happen in certain scenarios of course, and I won’t bore you will all of the details. But the best way forward was to bring the points removal feature back into the Comment and Post hooks.

At present, on a fresh install, the Comments hook will automatically reverse any points awarded to a user for a comment when it is marked as spam (or moved to the trash, or unapproved). If the comment gets approved again, the user will be awarded points again. The same is true for the Post points hook, albeit for posts, not comments, of course.

Currently the number of points removed is based on the  number of points that were awarded. Before, it was possible to configure the number of points to remove in the hook’s settings. It’s unlikely that we’ll be bringing that feature back, because when the hook’s settings change, it can lead to fewer or more points than expected being removed for old comments.

Previously it was possible to disable the points removal feature of these points hooks, and that is still true for many of you who are upgrading. However, on new installs it isn’t currently possible to disable the auto-reversal feature of these hooks. If you’d like to be able to disable this feature on a per-hook basis, let us know in the comments. I’m happy to consider adding this back in the future, if there is a need for it.

In summary of these changes, the Post and Comment hooks will now automatically reverse transactions when a post or comment is removed, respectively, and the Post Delete and Comment Removed hooks will be removed in 2.0.

Other changes in the release include improved caching, and the ability to see how many points each rank is for without having to open them on the Ranks admin screen.

So, what’s ahead? After 1.9, many assume that we’ll be releasing 2.0 next. And actually, that is the plan. However, 2.0 is going to be a major and non-backward compatible release, which will take longer than usual to develop. In the mean time, there will probably be a 1.10, and possibly a 1.11 as well. Also stay tuned for some other exciting things to happen in the next few months. 🙂

This entry was posted in Uncategorized on by .

About J.D. Grimes

J.D. is the creator of WordPoints. In addition to web development, he also enjoys nature photography. The most important thing about him, though, is that Jesus Christ died for him to pay for his sins. He looks forward to meeting Jesus face to face in heaven one day, and he hopes he'll see you there, too.

5 comments

  1. Revhast

    I keep getting this error when adding/editing the rank .
    “There was an error adding the rank. Please try again.”
    “There was an error updating the rank. Please try again.
    Work fine with “wordpoints-bugfix-200” .

    • J.D. Grimes

      Thank you for the report. I’ll investigate this and let you know when I find a solution.

    • J.D. Grimes

      I’ve found the cause of the problem and I’m working on a fix. I’m also creating some automated tests that will prevent this from happening again. I will be releasing an update later today.

    • J.D. Grimes

      I’ve just released version 1.9.1, which should fix this issue. Let me know if you continue to experience problems after updating.

      • Revhast

        It’s working smoothly now .
        Thanks for the great support Grimes !

Leave a Reply to Revhast Cancel

Your email address will not be published.

*