[wp-hackers] Upgrading a plugin that works on WP 2.9.2 to work with WP 3.0.1+

Austin Matzko austin at ilfilosofo.com
Fri Sep 10 00:56:31 UTC 2010

On Thu, Sep 9, 2010 at 6:36 PM, Dustin Lennon <demonicpagan at gmail.com> wrote:
> I'm still at a loss at how to get my plugin to activate without errors. Is
> there anything, anything at all that I can do to my code to help me out? The
> WP Codex hasn't been updated in how to write plugins that use a database to
> store values. I do know that in the codex that it still mentions using
> require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); and that is
> deprecated. Having it in my code originally cased it to show a white page
> after plugin activation.
> Right now, I have a plugin that says it creates a fatal error, what fatal
> error I don't know as it don't give any more information and am unsure
> whether or not if I do any plugin updates, it updates the MySQL tables.
> Plugin source: http://stelth2000inc.com/ffxi.phps

Hello Dustin,

If you want to learn more about the PHP error messages, try installing
something like Xdebug on your dev machine.  Xdebug is a PHP extension
that gives you lots of additional information when PHP prints errors.

When I try to activate your plugin from the code linked to above, I
get a bunch of PHP notices telling me about all the deprecated calls
you're making, and a warning and fatal error:
 * Warning: The plugin tries to include a file that doesn't exist, on
line 43: /admin/ffxi_admin.php.  (Perhaps this is part of the plugin
but not linked to above.)
 * Fatal Error: It calls dbDelta, which is undefined.

dbDelta is defined in wp-admin/includes/upgrade.php, so you may need
to include a line like the following in your plugin:

require_once ABSPATH . 'wp-admin/includes/upgrade.php';

More information about the wp-hackers mailing list