WordPoints / wordpoints

Points plugin for WordPress
GNU General Public License v2.0
20 stars 15 forks source link

Better update error handling for hooks #250

Closed JDGrimes closed 8 years ago

JDGrimes commented 9 years ago

Right now we don't really have any useful feedback for the user when there is an error updating a hook. Actually, the hooks UI doesn't really provide any feedback at all.

Inside WordPoints_Points_Hook::update_callback(), we pretty much ignore when update() returns false—we don't add the instance to the list, but we don't do anything else either.

The result is that there is actually no way to get any kind of error feedback.

At present I am thinking of working toward implementing something similar to what we have for the ranks, at least on the PHP side. As far as the JS/UI side goes, while it isn't necessary to move over to Backbone like the ranks are, we may actually want to consider a more massive overhaul of the hooks UI—and while we're at it, move to Backbone. That discussion probably belongs in another ticket, but one of the benefits would be easier integration and extension of the JS.

JDGrimes commented 8 years ago

This is so fixed in the new Hooks API (#321). It is really better.