[wp-hackers] "Plugin could not be activated because it triggered a fatal error." But what is the error?
Matthew Phillips
kestrachern at gmail.com
Thu Mar 11 18:51:16 UTC 2010
Is it a forgotten ; in the line
<?php echo $after_widget ?>
-------------------------
http://blip.fm/profile/kestrachern
On Thu, Mar 11, 2010 at 1:49 PM, James Nachlin <jnachlin at sixapart.com>wrote:
> Hi WP Hackers,
>
> I am writing my first plugin (pasted below) using WP 2.9.2, PHP 5.2.11,
> Apache/2.2.13 on OS X. I am accessing WordPress on localhost.
>
> When I attempt to activate the plugin on the Manage Plugins screen of the
> admin, I get "Plugin could not be activated because it triggered a fatal
> error."
>
> How can I view this fatal error?
>
> I have set php.ini to "error_reporting = E_ALL".
>
> I have turned on debug mode in my wp-config.php.
>
> The plugin code is pasted below. It is trivial, but to get much further I
> must be able to see what my errors are, because surely there will be many
> more of them.
>
> Thanks for your help!
>
> -Jim
>
>
>
> $ cat wp-content/plugins/jim-plugin/jim-plugin.php
> <?php
> /*
> Plugin Name: Jim the Plugin
> Plugin URI: http://localhost/~jnacho/
> Description: This is Jim's first plugin
> Version: 0.01
> Author: James N
> License: GPL2
> */
>
> function widget($args, $instance) {
> //extract( $args );
> $title = apply_filters('Jimz Widget', $instance['title']);
> ?>
> <?php echo $before_widget; ?>
> <?php if( $title ) echo $before_title . $title . $after_title; ?>
> Hello, Widget!
> <?php echo $after_widget ?>
> <?php
> }
>
> function stick_on_dashboard() {
> wp_add_dashboard_widget('SomeWidget', 'Some Widget Jim', 'widget');
> }
>
> add_action('wp_dashboard_setup', 'stick_on_dashboard' );
>
> ?>
>
>
>
> _______________________________________________
> 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