Comments on: Plugin Updates and WordPress 2.3 http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/ Create the Internet of your Dreams Sun, 14 Jun 2009 17:21:33 +0000 http://wordpress.org/?v=2.3.1 By: Quandary http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6176 Quandary Tue, 02 Oct 2007 15:39:46 +0000 http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6176 @Eduo, Well, you aren't the only person to have had this problem. I'm really pedantic about triggering the update code <em>only</em> on plugin activation, because it's a relatively expensive chunk of code within my plugin. The 2.x series didn't have its own tables, so it was even expensive to verify that everything was up-to-date (I had to do a scan of the postmeta table). In the 3.x world, a single check to see if the table exists is fairly cheap. However, the frequency with which that check would be done (once every page load) still worries me. I'd really like to have In Series do the Right Thing so that nobody ever has this kind of problem, but I also don't want to contribute to excessive database loading. :/ In any case, I'm glad you like the new UI. :) @Eduo,

Well, you aren’t the only person to have had this problem. I’m really pedantic about triggering the update code only on plugin activation, because it’s a relatively expensive chunk of code within my plugin. The 2.x series didn’t have its own tables, so it was even expensive to verify that everything was up-to-date (I had to do a scan of the postmeta table).

In the 3.x world, a single check to see if the table exists is fairly cheap. However, the frequency with which that check would be done (once every page load) still worries me. I’d really like to have In Series do the Right Thing so that nobody ever has this kind of problem, but I also don’t want to contribute to excessive database loading. :/

In any case, I’m glad you like the new UI. :)

]]>
By: eduo http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6171 eduo Tue, 02 Oct 2007 07:52:27 +0000 http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6171 Ah. I didn't know this. I must've missed it from the docs. I admit I was lazy and overwrote the old plugin with the new (I was actually too surprised seeing I had missed almost 5 versions which, in hindsight should've been even more reason to go through standard procedure :) The plugin works beautifully. The new (to me) box fixes everything I didn't like about the older version. Fantastic. Ah. I didn’t know this. I must’ve missed it from the docs.

I admit I was lazy and overwrote the old plugin with the new (I was actually too surprised seeing I had missed almost 5 versions which, in hindsight should’ve been even more reason to go through standard procedure :)

The plugin works beautifully. The new (to me) box fixes everything I didn’t like about the older version. Fantastic.

]]>
By: Quandary http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6167 Quandary Mon, 01 Oct 2007 17:28:09 +0000 http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6167 @Eduo, You have to go through <a href="http://wordpress.org/extend/plugins/in-series/installation/" rel="nofollow">standard upgrade procedure</a>: disable the old version of In Series, install the new version, then enable the new version. This is how the tables get created, and how the "first run checks" get triggered. @Eduo,

You have to go through standard upgrade procedure: disable the old version of In Series, install the new version, then enable the new version. This is how the tables get created, and how the “first run checks” get triggered.

]]>
By: eduo http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6160 eduo Mon, 01 Oct 2007 11:10:11 +0000 http://remstate.com/2007/09/30/plugin-updates-and-wordpress-23/#comment-6160 While you're checking this out you might want to take a look at the set-up for the plugin in brand-new installations. I had a very (VERY) old version of the plugin and updated to the newest one. After this all my posts had this error: WordPress database error: [Table 'eduo_wp.wp_in_series_3_0_6_entries' doesn't exist] SELECT series_id FROM wp_in_series_3_0_6_entries WHERE post_id='382' (eduo is my baseprefix) When trying to check the config page I also got an error (that I didn't copy) if I tried to save the page without anything selected, checked or written. The way to fix both is to actually use the plug-in so the tables are created. So, I think it'd be a good idea to do two things: 1.-The "foreach" in (I think) line 27 of the config.php page for the plugin shouldn't give an error if all fields are blank (or should have default values). Saving it with all fields blank gives an error (as the foreach assumes there's at least one thing to check). 2.-The plugin should check if the table exists and create it if not (I think I fixed mine creating a new post and assigning it to a category, although it did pick up my older ones. Now posts don't show the error) Probably as part of the "first run" checks. While you’re checking this out you might want to take a look at the set-up for the plugin in brand-new installations. I had a very (VERY) old version of the plugin and updated to the newest one. After this all my posts had this error:

WordPress database error: [Table ‘eduo_wp.wp_in_series_3_0_6_entries’ doesn’t exist]
SELECT series_id FROM wp_in_series_3_0_6_entries WHERE post_id=’382′

(eduo is my baseprefix)

When trying to check the config page I also got an error (that I didn’t copy) if I tried to save the page without anything selected, checked or written.

The way to fix both is to actually use the plug-in so the tables are created.

So, I think it’d be a good idea to do two things:

1.-The “foreach” in (I think) line 27 of the config.php page for the plugin shouldn’t give an error if all fields are blank (or should have default values). Saving it with all fields blank gives an error (as the foreach assumes there’s at least one thing to check).

2.-The plugin should check if the table exists and create it if not (I think I fixed mine creating a new post and assigning it to a category, although it did pick up my older ones. Now posts don’t show the error)

Probably as part of the “first run” checks.

]]>