WordPress.org

Ready to get started?Download WordPress

Forums

Page Meta
[resolved] Errors on activation and deactivation (4 posts)

  1. wpsecuritylock
    Member
    Posted 2 years ago #

    I copied this from a previous reply I posted on the forum and realized I should put it here since this plugin appears to be broken.

    The plugin generated 278 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    When I deactivate it, I get this error (but it flashes really fast):

    Warning: call_user_func_array()[function.call-user-func-array]: First argument is expected to be a valid callback, 'Array' was giving in /wp-includes/plugin.php on line 405.

    Any ideas?

    http://wordpress.org/extend/plugins/pagemeta/

  2. johnmdmnsys
    Member
    Posted 2 years ago #

    I found the source of the activation error and am looking for the most appropriate place to post about it. (This is my first plugin bug find!)

    Inside the pagemeta folder, in the file index.php lines 29-30 show the following:

    register_activation_hook(__FILE__, array(&$pageMeta, 'activate'));
    register_deactivation_hook(__FILE__, array(&$pageMeta, 'deactivate'));

    Change both of the '$pageMeta' variables to '$this':

    register_activation_hook(__FILE__, array(&$this, 'activate'));
    register_deactivation_hook(__FILE__, array(&$this, 'deactivate'));

    After this change I no longer get the warning message on activation.

  3. WebDragon
    Member
    Posted 2 years ago #

    this does indeed fix the plugin for wp 3.3.2 as well

  4. WebDragon
    Member
    Posted 2 years ago #

    ... though not entirely. it also apparently alters the in-page Title as well as the <title> which is completely undesirable. This *may* be due to how the particular theme operates, so I will test further.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags