I have been trying to implement the “Now Reading” plugin from Roblog as I thought it was a great way to keep track of what books I read and at what date.
But I couldn’t get it to work. It kept crashing with a MySql error whenever I wanted to add a book to the list in the admin interface. Despite several comments in the blog entry by me and others who had the same problem, the author of the plugin did not react to propose a solution.
One enterprising soul who had the same problem, found the answer however, and I’ve since corrected it and activated the plug in (
although it won’t show up on my homepage as yet). I’m now documenting the fix here as well.
The problem is that Now Reading re-uses a WordPress variable called “query” without reinitializing it. Normally this does not cause any problems, but if you have a plug in (like for example weathericon) that query variable is already used, and thus contains data.
Solution : in the Now reading plugin, modify the add.php file and add a line all the way in the beginning :
This resets the variable to “empty” and thus the result returned to the browser will be valid.