• The site has a critical error which disable me from access the wp-admin

    Through FTP error_log the below seems to be causing the issue:

    PHP Fatal error: require(): Failed opening required ‘/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/class-wp-dependencies.php’ (include_path=’.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php’) in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/script-loader.php on line 23

    PHP Warning: require(/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/class-wp-dependencies.php): failed to open stream: No such file or directory in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/script-loader.php on line 23

    I tried deactivating all plugins through plugins.hold but it didn’t resolve anything and still couldn’t access wp-admin

    Most of the site is still up just one section is not accessible.

    Can someone provide some solutions?

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

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter johnnysimon777

    (@johnnysimon777)

    I’ve run a debug and got these additional info:

    Warning: require(/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/class-wp-dependencies.php): failed to open stream: No such file or directory in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/script-loader.php on line 23
    
    Fatal error: require(): Failed opening required '/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/class-wp-dependencies.php' (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/script-loader.php on line 23
    
    Notice: Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php on line 5836
    
    Notice: Function is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php on line 5836
    Thread Starter johnnysimon777

    (@johnnysimon777)

    So I fixed that as there was a slight file naming inconsistency.
    Now I’m getting this:
    PHP Fatal error: Call to a member function has() on null in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/l10n.php on line 1268

    Hi,
    seems like you have modified the wp core files?
    The class-wp-dependencies.php file should be called class.wp-dependencies.php not with an _
    Fix your wordpress files manually:

    upload and overwrite these 2 folders from a functioning wordpress installation make sure to use the same version that you have
    /wp-admin/
    /wp-includes/
    
    and all .php files in the site root (make sure to not replace the wp-config.php!!)
    Thread Starter johnnysimon777

    (@johnnysimon777)

    I’ve overwritten those from a functioning compatible functioning wordpress installation but it still the same error.

    If it helps here’s the code the error:
    The line in question: if ( ! $wp_textdomain_registry->has( $domain ) ) {
    The section it’s from:

    // Short-circuit if domain is 'default' which is reserved for core.
    	if ( 'default' === $domain || isset( $l10n_unloaded[ $domain ] ) ) {
    		return false;
    	}
    
    	if ( ! $wp_textdomain_registry->has( $domain ) ) {
    		return false;
    	}
    
    	$locale = determine_locale();
    	$path   = $wp_textdomain_registry->get( $domain, $locale );
    	if ( ! $path ) {
    		return false;
    	}
    	// Themes with their language directory outside of WP_LANG_DIR have a different file name.
    	$template_directory   = trailingslashit( get_template_directory() );
    	$stylesheet_directory = trailingslashit( get_stylesheet_directory() );
    	if ( str_starts_with( $path, $template_directory ) || str_starts_with( $path, $stylesheet_directory ) ) {
    		$mofile = "{$path}{$locale}.mo";
    	} else {
    		$mofile = "{$path}{$domain}-{$locale}.mo";
    	}
    
    	return load_textdomain( $domain, $mofile, $locale );
    }

    And also this comes up:
    Deprecated: File class-wp-styles.php is deprecated since version 6.1.0! Use wp-includes/class-wp-styles.php instead. in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php on line 5574

    Thread Starter johnnysimon777

    (@johnnysimon777)

    Also I noticed that the errors started on Error_log about 30sec after all the WordPress themes that are deactivated were marked as Last Modified. Feel like too big a coincidence.. Do you think I should delete those?

    Yeah delete themes and plugins that you don’t need anymore. Try to deactivate some plugins by renaming them in /wp-content/plugins/ , maybe one of them has a problem.

    Thread Starter johnnysimon777

    (@johnnysimon777)

    I get this when I turn off all the plugins now but still no wp-admin access:

    Warning: include_once(/home/yx1o2mvajdj0/public_html/indexandco/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /home/yx1o2mvajdj0/public_html/indexandco/wp-content/advanced-cache.php on line 22
    
    Warning: include_once(): Failed opening '/home/yx1o2mvajdj0/public_html/indexandco/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/yx1o2mvajdj0/public_html/indexandco/wp-content/advanced-cache.php on line 22
    
    Fatal error: Call to a member function has() on null in /home/yx1o2mvajdj0/public_html/indexandco/wp-includes/l10n.php on line 1268

    Hi, this probably is some problem from the theme internationalization, have your translated your website into multiple languages?
    Try to deactivate and multi language parts of your website e.G. your theme.

    Thread Starter johnnysimon777

    (@johnnysimon777)

    Hi, no it’s only in one language i.e. English
    No changes were made prior to the Error happening.
    Strangely it only affects certain product pages and wp-admin but most the site runs perfectly fine..
    The only thing I noticed in File Manager was those old deactivated wordpress theme having auto-updated/last mofified about 30s before the error warnings started in Error_Log but sounds unlikely deactivated themes updating would cause this?

    Thread Starter johnnysimon777

    (@johnnysimon777)

    I was able to get everything back up, I just have all those error message on the homepage. Otherwise the rest of the site works perfectly. Do you know how to fix that: CHECK HERE

    Hi, I don’t see any error messages on your page, maybe you only see it because you are logged in.
    Please post those errors

    Thread Starter johnnysimon777

    (@johnnysimon777)

    <br />
    <b>Notice</b>: Function register_sidebar was called incorrectly. No id was set in the arguments array for the “Blog Sidebar” sidebar. Defaulting to “sidebar-1”. Manually set the id to “sidebar-1” to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5834</b><br />
    <br />
    <b>Notice</b>: Function register_sidebar was called incorrectly. No id was set in the arguments array for the “Page Sidebar” sidebar. Defaulting to “sidebar-2”. Manually set the id to “sidebar-2” to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5834</b><br />
    <br />
    <b>Notice</b>: Function register_sidebar was called incorrectly. No id was set in the arguments array for the “WooCommerce Sidebar” sidebar. Defaulting to “sidebar-3”. Manually set the id to “sidebar-3” to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5834</b><br />
    <br />
    <b>Notice</b>: Function register_sidebar was called incorrectly. No id was set in the arguments array for the “Footer Area 1” sidebar. Defaulting to “sidebar-4”. Manually set the id to “sidebar-4” to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5834</b><br />
    <br />
    <b>Notice</b>: Function register_sidebar was called incorrectly. No id was set in the arguments array for the “Footer Area 2” sidebar. Defaulting to “sidebar-5”. Manually set the id to “sidebar-5” to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5834</b><br />
    <br />
    <b>Notice</b>: Function register_sidebar was called incorrectly. No id was set in the arguments array for the “Footer Area 3” sidebar. Defaulting to “sidebar-6”. Manually set the id to “sidebar-6” to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5834</b><br />
    <br />
    <b>Notice</b>: Function register_sidebar was called incorrectly. No id was set in the arguments array for the “Footer Area 4” sidebar. Defaulting to “sidebar-7”. Manually set the id to “sidebar-7” to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5834</b><br />
    <br />
    <b>Deprecated</b>: The called constructor method for WP_Widget class in Recent_Posts_Extra_Widget is deprecated since version 4.3.0! Use __construct() instead. in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5475</b><br />
    <br />
    <b>Deprecated</b>: The called constructor method for WP_Widget class in Recent_Projects_Widget is deprecated since version 4.3.0! Use __construct() instead. in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/functions.php</b> on line <b>5475</b><br />
    <br />
    <b>Warning</b>: strpos() expects parameter 1 to be string, array given in <b>/home/yx1o2mvajdj0/public_html/indexandco/wp-includes/blocks.php</b> on line <b>20</b><br />

    Thread Starter johnnysimon777

    (@johnnysimon777)

    Ironically I don’t see them on mobile or even on desktop when Im logged in.
    But if Im logged out desktop then I see the messages showing up

    Hi,
    I think you have wordpress debug still on, you need to set all debug options like display_erros to off in wp-config.php

    • This reply was modified 3 years, 4 months ago by Benedikt Ledl.
    Thread Starter johnnysimon777

    (@johnnysimon777)

    Everything is disabled but still showing:
    ini_set(‘display_errors’,’Off’);
    ini_set(‘error_reporting’, 0 );
    define(‘WP_DEBUG’, false);
    define(‘WP_DEBUG_DISPLAY’, false);

    Unless Im missing something

Viewing 15 replies - 1 through 15 (of 20 total)

The topic ‘Critical Error PHP Fatal Error Failed opening required class-wp-dependencies.php’ is closed to new replies.