Blog News Programming

Now Reading plugin conflict (MySql Error)

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.

(Visited 37 times, 1 visits today)

5 replies on “Now Reading plugin conflict (MySql Error)”

Yes, 3.x is still under development, but it is less buggy and more stable than the 2.3.1 line … It really should be released … but we want to get the last of the major bugs squashed before releasing it.

Ah … followed the link. I understand the problem. It only affects the pre-3.x line (all it’s variables are global which is really, really bad). The 3.x line is using classes. The only real possibe collision is if someone using $WI (the global name of the main WI class) … which I’m hoping no one else does ’cause $WeatherIcon is long … and not as short as $WI …

Comments are closed.

%d bloggers like this: