Uncaught Error: Call to undefined function bws_general_menu()
-
This error started happening a couple days ago:
PHP Fatal error: Uncaught Error: Call to undefined function bws_general_menu() in /home/admin/web/website.org/public_html/wp-content/plugins/contact-form-plugin/contact_form.php:36\nStack trace:\n#0 /home/admin/web/website.org/public_html/wp-includes/class-wp-hook.php(286): cntctfrm_admin_menu(”)\n#1 /home/admin/web/website.org/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)\n#2 /home/admin/web/website.org/public_html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)\n#3 /home/admin/web/website.org/public_html/wp-admin/includes/menu.php(149): do_action(‘admin_menu’, ”)\n#4 /home/admin/web/website.org/public_html/wp-admin/menu.php(286): require_once(‘/home/admin/web…’)\n#5 /home/admin/web/website.org/public_html/wp-admin/admin.php(140): require(‘/home/admin/web…’)\n#6 /home/admin/web/website.org/public_html/wp-admin/customize.php(13): require_once(‘/home/admin/web…’)\n# in /home/admin/web/website.org/public_html/wp-content/plugins/contact-form-plugin/contact_form.php on line 36, referer: https://website.org/
Here’s the relevant code from contact_form.php:
if ( ! function_exists( ‘cntctfrm_admin_menu’ ) ) {
function cntctfrm_admin_menu() {
bws_general_menu();
$cntctfrm_settings = add_submenu_page( ‘bws_panel’, __( ‘Contact Form Settings’, ‘contact-form-plugin’ ), __( ‘Contact Form’, ‘contact-form-plugin’ ), ‘manage_options’, ‘contact_form.php’, ‘cntc$
add_action( ‘load-‘ . $cntctfrm_settings, ‘cntctfrm_add_tabs’ );
}
}It’s calling the bws_general_menu() function, but that function hasn’t been loaded.
For now, I’ve resolved the issue by copying the bws_general_menu() function from bws_menu/deprecated.php to contact_form.php, but that’ll of course be erased with the next plugin update.
Thanks for your help.
- The topic ‘Uncaught Error: Call to undefined function bws_general_menu()’ is closed to new replies.