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

Dustin Lennon demonicpagan at gmail.com
Fri Sep 10 04:23:07 UTC 2010


That is correct, I don't have my entire script linked in that url.  I have
not provided the source to admin/ffxi_admin.php.

I have updated my source at the previous URL to add the require_once back
into the picture, though I think now when I try to activate the plugin, all
it will provide me is a white screen and me unknown as to what the error
might be. (and that is the case after I just performed it)

I'll see if I can locate how to make use of that Xdebug.

-Dustin

This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and delete
this e-mail from your system. E-mail transmission cannot be guaranteed to be
secure or error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender
therefore does not accept liability for any errors or omissions in the
contents of this message, which arise as a result of e-mail transmission.


-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Austin Matzko
Sent: Thursday, September 09, 2010 7:57 PM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Upgrading a plugin that works on WP 2.9.2 to work
with WP 3.0.1+

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';
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list