Support » Fixing WordPress » deprecated since version 4.5

  • Notice: add_utility_page is deprecated since version 4.5! Use add_menu_page() instead. in example.com/htdocs/www/wp-includes/functions.php on line 3662

    Notice: add_object_page is deprecated since version 4.5! Use add_menu_page() instead. in example.com/htdocs/www/wp-includes/functions.php on line 3662

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    If you do not need WP_DEBUG on then you can disable it in your wp-config.php file and those messages should go away.

    https://codex.wordpress.org/Editing_wp-config.php#Debug

    Make this line

    define( 'WP_DEBUG', true );

    to

    define( 'WP_DEBUG', false );

    and that should fix it. It’s a warning and can be disregarded for now. Though your plugin or theme should be updated. 😉

    The same notice appeared, how to know what plugin?

    They released 4.5 with a notice in the core code it’s not a plugin.

    I’m using Dreamweaver and you can search on all local files in the plugin folder from your site on add_object_page and add_utility_page.

    We ran into this same issue also just this week. I made the recommended change, and ended up hosing the entire admin area with a Fatal Error. What was worse was that I couldn’t undo it by simply reverting the code. Super frustrating!

    My solution to get the admin area back was re-uploading all the core /wp-admin and /wp-includes files along with wp-settings.php

    No fun, and the depreciated function call is still an issue breaking pages in the admin area when saving plugin settings or other functions. The settings seem to update, but the blank pages with PHP Warnings really sucks the proverbial butt.

    Currently, this is what I still get:

    Notice: add_object_page is deprecated since version 4.5! Use add_menu_page() instead. in /home/sites/public_html/ourwebsite/wp-includes/functions.php on line 3658

    Any suggestions? Were there core files I missed?

    @stimpygato said: Any suggestions? Were there core files I missed?

    You simply never alter core files; it’s not a good idea.

    This is a theme pr plugin issue. Have you updated your theme and plugins?

    What theme are you using? Where did you download it from? http://codex.wordpress.org/Forum_Welcome#Include_as_Much_Information_as_Possible

    Log Depreciated Notices saved the day. I fixed the issue in seconds. This is now a Must-Use plugin IMHO. It quickly identified the out-of-date plugin that needed the update.

    Of course, overwriting core files wasn’t the elegant approach, but sometimes a Nuke & Pave is necessary when getting the site back is the top priority.

    Hi, in my case this alert was generated by Contact Form 7 Plugin. The last Plugin Update resolve it. They have replaced add_object_page with add_menu_page in admin.php file.
    Bye.

    Indeed, thank you ivandelaros.
    I updated Contact Form 7 Plugin and it works well !

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘deprecated since version 4.5’ is closed to new replies.