• Hi,

    I tried updating WordPress to the latest version from the dashboard but it failed, then I updated it manually via FTP and after it was done this error appeared:
    Uncaught Error: Call to a member function has() on null in ./wp-includes/l10n.php:1268 Stack trace: #0 ./wp-includes/l10n.php(1303): _load_textdomain_just_in_time('blocksy-compani...')

    I updated WordPress manually (via FTP) by replacing the wp-admin and wp-includes folders with the latest folders from WordPress.

    I have tried renaming the “plugins” and “themes” folders to something else to disable them and the error keeps appearing

    How to fix it?

    Note:
    – The error is still there, you can visit my website to see it.
    – No email recovery link has been sent to my email.
    – The error appears on all pages.

    Any help is greatly appreciated, thank you very much

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Anonymous User

    (@anonymized-20801613)

    There is a similar topic here – https://wordpress.org/support/topic/fatal-error-uncaught-error-call-to-a-member-function-get-on-null/ … could you try this first?

    The best way to determine this is to:
    
        Temporarily switch your theme to Storefront
        Disable all plugins except for WooCommerce
        Repeat the action that is causing the problem
    Thread Starter Mushlih Almubarak

    (@mushlih)

    Thanks for the answer, but I think that topic is in the woocommerce plugin, and I think this problem is from the wordpress core.

    Even so, I’ve tried to switch the theme (from FTP because I can’t enter the wordpress dashboard) to the default wordpress theme, and also disabled all plugins (from FTP) as suggested on that topic, but the errors still appears

    Anonymous User

    (@anonymized-20801613)

    You are right. This is from WordPress Core, code – https://github.com/WordPress/WordPress/blob/master/wp-includes/l10n.php:

    * @param string $domain Text domain. Unique identifier for retrieving translated strings.
     * @return bool True when the textdomain is successfully loaded, false otherwise.
     */
    function _load_textdomain_just_in_time( $domain ) {
    	/** @var WP_Textdomain_Registry $wp_textdomain_registry */
    	global $l10n_unloaded, $wp_textdomain_registry;
    
    	$l10n_unloaded = (array) $l10n_unloaded;
    
    	// 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 );
    }

    Google shows relevance to WPML plugin, however you said, you disabled all plugins, right?
    https://websitecare.io/solution-uncaught-error-call-to-undefined-method-wp_textdomain_registryreset/
    https://wpml.org/forums/topic/fatal-error-uncaught-error-call-to-undefined-method-wp_textdomain_registry/page/2/

    Thread Starter Mushlih Almubarak

    (@mushlih)

    Thank you very much for the answer, and sorry for my late reply.

    Yes, I have disabled all the plugins by renaming the “plugins” folder to “plugins-off”. I can’t login to my WordPress dashboard so I disabled all plugins with this way.

    Regarding the link you sent, I have never used the WPML plugin on my website at all, and because the error mentioned in that link comes from the WPML plugin, not from the WordPress core like in my current issue, I can’t follow the method on that link

    Thread Starter Mushlih Almubarak

    (@mushlih)

    Hi everyone, I’ve realized the cause of this error is because I didn’t update the WordPress manually properly, I forgot to replace all the files in the root folder of my WordPress with the latest files from WordPress.

    Thanks everyone for the help.

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

The topic ‘Uncaught Error: Call to a member function has() on null’ is closed to new replies.