I ran into a problem this past week that I am not sure will affect anyone else but my own swim team. Our volunteer coordinator let me know that she was unable to add new jobs. I couldn’t replicate the behavior in my development area which required me to debug it on the live server (ugh).
Because most of the things I add and/or changes I make to wp-SwimTeam are for the MacDolphins (but not always), I usually test them on the MacDolphins web site before releasing an update. When I first added the Jobs module to wp-SwimTeam I had defined column names in the database table. At some point I decided to be more descriptive with my names and changed the column names. I think, but I can’t be sure, that I did this before publicly releasing the plugin update. WordPress usually, but unfortunately not always, handles database schema changes correctly and will change column names.
In my case, WordPress, for whatever reason, didn’t change the column name, it defined a new one. While this isn’t of itself a real problem, having a few unused columns in the database isn’t preferred, it isn’t a real big problem either. Except that the default value for the column was never defined (oops) and at some point, MySQL (maybe MySQL5) started to care that the column wasn’t initialized.
The net result was we was we were unable to add new jobs because MySQL was returning an error message due to the uninitialized column that wp-SwimTeam wasn’t accounting for. The simple solution for us was to simply delete the columns that shouldn’t have been there in the first place and won’t ever be there for people using the plugin now.
In the process of chasing this problem down, I found an area of my database interface where I wasn’t properly accounting for possible database errors. I have updated the database interface class and the Jobs module which sits on top of it. Over time I will also retrofit this change into other parts of the plugin as I work on them.
Look for a plugin update to be released in the next day or so.