• Resolved jimmyessbear

    (@jimmyessbear)


    Really, the title says it all. I allowed the site to automatically update to 6.9 and when I went to check it out, there’s an error that says:
    Deprecated: Function WP_Dependencies->add_data() was called with an argument that is deprecated since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /var/www/html/wp-includes/functions.php on line 6131

    I did go to line 6131 in functions.php, of course, but that is just part of this:

    if ( E_USER_ERROR === $error_level ) {
        throw new WP_Exception( $message );
    }
    
    trigger_error( $message, $error_level );

    Obviously, that’s not where the error lies.

    I am using the Kalidasa theme and the default themes don’t do this, but I’m a bit at a loss where to look in my theme files to resolve this.

    The page I need help with: [log in to see the link]

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

    The most important thing to do is to set up WordPress so that it won’t show these notices on the site. Usually this is done by editing your wp-config.php file according to this document, or by following this unofficial tutorial; whichever feels easier.

    The notice itself is not a true error, but a warning for developers and administrators. In this case, it pertains to the deprecation of legacy code that was meant to help authors support Internet Explorer. I recommend contacting the authors of the Kalidasa theme so thay they can update it to remove any Internet-Explorer-specific workarounds that they may have kept.

    Moderator threadi

    (@threadi)

    This is not an error message but a notification from WordPress Core that one of the WordPress components (the object WP_Dependencies ) used by your project (plugins or theme) has been marked as deprecated. This means that it will no longer be available in future versions of WordPress and will then actually lead to an error.

    I currently see the following tasks for you:

    • Check which of your plugins or themes use the WP_Dependencies component. You can find this out, for example, by deactivating all plugins and seeing if the message disappears. If necessary, use a staging system to test this.
    • I’m not sure where you’re seeing this deprecated message. If it’s displayed in your browser, I would strongly recommend disabling the output of PHP messages. You can do this in the wp-config.php file. See also: https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
    Thread Starter jimmyessbear

    (@jimmyessbear)

    Thanks both for your input. It’s been quite a few years since I set this up and I guess I had set debugging up to fix something else.

    Thanks again.

    davidjason

    (@davidjason)

    Great that you got it sorted! Just a follow-up in case anyone else hits this: The WP_Dependencies deprecation warning typically appears when themes or plugins are written for older WordPress versions. Sometimes the issue appears because:

    1. A plugin or theme hasn’t been updated since WP 5.x and uses deprecated code
    2. You have an old custom code snippet using WP_Dependencies directly

    If the warning comes back in future, updating Kalidasa theme might fix it. You can also check the debug.log in /wp-content/ to see exactly which plugin/theme is causing it.

    Thanks for sharing the solution!

    ghartwig

    (@ghartwig)

    I wish WordPress would show the name and line of the caller rather than point to its own code when showing an error! This just sends us off on a treasure hunt to find the real error and is very frustrating.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.