WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Widgets
[resolved] Error: PHP Fatal error: Call to undefined function add_submenu_page() (10 posts)

  1. Omega Supreme
    Member
    Posted 2 years ago #

    Hi,

    I have an error and wondered if anyone could help.

    The error is

    PHP Fatal error: Call to undefined function add_submenu_page() in /wp-content/plugins/dynamic-widgets/dynamic-widgets.php on line 559

    Thanks.

    http://wordpress.org/extend/plugins/dynamic-widgets/

  2. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    It looks like you're not using the latest version of Dynamic Widgets. Please make sure you do. http://downloads.wordpress.org/plugin/dynamic-widgets.1.5.2.zip

  3. Omega Supreme
    Member
    Posted 2 years ago #

    Thanks for the reply. I am using 1.5.2

  4. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    I'm sorry, but that's almost impossible. The call to the function add_submenu_page() is in version 1.5.2 not on line 559 in dynamic-widgets.php.

  5. Omega Supreme
    Member
    Posted 2 years ago #

    I double checked and it is 1.5.2 I also downloaded it just now to check with my version on the site and it's the same.

    Maybe my editor reads the lines slightly different, but here is my line 550 to 573

    #550# add_action('sidebar_admin_setup', 'dynwid_add_widget_control');
    }
    } else {
    if ( $DW->enabled ) {
    add_action('wp_head', 'dynwid_filter_widgets');
    }
    }
    } else {
    // Show errors in the admin page
    add_submenu_page('themes.php', __('Dynamic Widgets', DW_L10N_DOMAIN), __('Dynamic Widgets', DW_L10N_DOMAIN), 'edit_theme_options', 'dynwid-config', 'dynwid_disabled_page');
    }
    }
    /**
    * dynwid_install() Installation
    * @since 1.3.1
    */
    function dynwid_install() {
    if ( function_exists('is_multisite') ) {
    if ( is_multisite() && isset($_GET['networkwide']) && $_GET['networkwide'] == '1' ) {
    $plugin = plugin_basename(__FILE__);
    deactivate_plugins($plugin);
    } else {
    dynwid_activate();
    #573# }

  6. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    That is extremely weird. If you look in the Trac explorer at http://plugins.trac.wordpress.org/browser/dynamic-widgets/trunk/dynamic-widgets.php?rev=532983 you will see the line is in 626.

    In this case it doesn't matter so much, because that line of code is there just to show you an error message saying you're host is not meeting the requirements needed for Dynamic Widgets to run. DW needs at least PHP 5.1.0 and WordPress 3.

  7. Omega Supreme
    Member
    Posted 2 years ago #

    PHP Version 5.3.8
    Wordpress 3.3.2

    Yup, not making sense to me either :)

  8. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    Making it even more weird. Something very strange is going on at your host.

    • PHP complains about not able to find the function add_submenu_page() which is a common WP function.
    • DW complains about not meeting minimum requirements, so either PHP_VERSION and/or $GLOBALS['wp_version'] is not reporting the correct value or the PHP function version_compare() is acting funny.

    I'd almost suspect a broken PHP version, but then WordPress would not work either I guess. I really have no idea what's going on.

  9. Omega Supreme
    Member
    Posted 2 years ago #

    LOL, interesting.

    I will look over those points you mentioned and see if it corrects the issue.

    I do have a custom php.ini in the account and there was an odd issue with the site and magic quotes before moving it to this server. Pretty much everything was fixed so I was even surprised to see these errors.

  10. ksnyde
    Member
    Posted 1 year ago #

    @omega did you ever solve this? I've run into this today in a plugin that I created but never had any issues with it before. Bizzare.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.