• Hi all, my error log is giving me the following message;

    Notice: add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead. in /home/www/adrenalinegaa.com/wordpress/wp-includes/functions.php on line 3706

    I’ve looked at functions.php and see no add_object_page on any line.

    Why is this error message appearing and how can I fix it?

    My site

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi,

    You are probably using an outdated plugin or theme option that is still calling the deprecated add_object_page() function.

    I would start by deactivating all plugins; and clearing the error log. Next, reactivate a few plugins, and click a few pages of your website admin panel (just to see if error reproduces).

    If the error does NOT show, go back and activate a few more plugins, again repeating the clicking admin pages, and again check the error log.

    If you do this for ALL plugins and still show the error; then it may be in your theme. In this case, try switching to the default 2016 theme, clearing the error log, and clicking admin pages. Again, check the log.

    Eventually you will find a plugin (or theme option) that is causing the error.

    PS:
    That error notice is not very helpful as it does not provide the location of the file that is calling the deprecated function. It only tells you the function name; so you have to dig for answers.

    Let us know how you do.

    Thread Starter NiallASD

    (@niallasd)

    Thanks for the reply Josh, how do I go about clearing the error log?

    You’ll need to use either FTP or your hosts cPanel software (via your browser) to gain access to the file directories where you installed WordPress.

    The error_log file can be found in the root directory (where you originally edited the wp-config.php file).

    You can download and save this error log file (to keep for posterity); or you may simply delete it from the server. As new errors are found; they error_log file will be automatically created again. So, if you delete it, and the error_log appears again… then you know the error is still present.

    Remember to keep deleting that file as you are troublshooing; it’ll get confusing if you forget to delete, and see the same errors 😉

    Thread Starter NiallASD

    (@niallasd)

    I looked in my root directory and I can’t see an error log…

    In order to get the error to appear on my dashboard I added the following to wp-config.php

    define(‘WP_DEBUG’, true );
    define(‘WP_DEBUG_LOG’, true );

    Okay, apologies. I thought you were “error logging” in a different way.

    With “WP_DEBUG_LOG”, the file is saved in the “wp-content” directory. The filename should be “debug.log”. You can read more about it on the WordPress Codex for Debugging.

    BUT… If you are seeing these errors on your dashboard, then you don’t really need to look at the debug log file. The error will stop displaying in your dashboard whenever the faulty code is removed/deactivated.

    Thread Starter NiallASD

    (@niallasd)

    I switched to the default 2016 theme and the error message left so I guess the problem is within my custom theme.

    A step in the right direction…

    Thread Starter NiallASD

    (@niallasd)

    I’ve since noticed that the line appears next to the progress bar as I upload an image – the seem to upload OK though.

    hi josh i have a problem with my login i got this error

    Notice: add_object_page is deprecated since version 4.5.0! Use add_menu_page() instead. in /home/soni0713/public_html/wp-includes/functions.php on line 3707

    and can’t go to my wp-admin page it shows white screen while i login
    please ow to resolve it?

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