Support » Plugins and Hacks » [Resolved] [Plugin: Dynamic Widgets] Error: PHP Fatal error: Call to undefined function add_submenu_page()

[Resolved] [Plugin: Dynamic Widgets] Error: PHP Fatal error: Call to undefined function add_submenu_page()

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Qurl


    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

    Thanks for the reply. I am using 1.5.2

    Plugin Author Qurl


    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.

    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__);
    } else {
    #573# }

    Plugin Author Qurl


    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.

    PHP Version 5.3.8
    Wordpress 3.3.2

    Yup, not making sense to me either 🙂

    Plugin Author Qurl


    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.

    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.

    @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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] [Plugin: Dynamic Widgets] Error: PHP Fatal error: Call to undefined function add_submenu_page()’ is closed to new replies.