Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing a PHP Fatal error after updating WPML, it might be due to a conflict with the Codevz Plus Plugin. This plugin blocks the wpml.org domain, which can cause issues with WPML functionality.
Solution:
We recommend deactivating the Codevz Plus Plugin to resolve this issue. Alternatively, you can modify the plugin's code to stop blocking the wpml.org domain. Here's how you can do it:

// Locate the blocked hosts array in your Codevz Plus Plugin file.<br />// Comment out the 'wpml.org' line as shown below:<br />// 'wpml.org',<br />

Please note that the Codevz Plus Plugin is not officially compatible with WPML. We encourage you to contact the plugin authors and request them to join our Go Global Program for compatibility support.

For more details, refer to our errata page: Codevz Plus PHP Fatal Error.

If this solution does not apply to your case, or if it seems outdated, please open a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, you can always contact us through the WPML support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: ,

This topic contains 4 replies, has 2 voices.

Last updated by ammarA-18 11 months, 3 weeks ago.

Assisted by: Itamar.

Author Posts
August 7, 2024 at 11:11 am

ammarA-18

Background of the issue:
I am trying to update WPML to the latest version on my site hidden link. After updating WPML, I encountered an error. The error log is as follows: [07-Aug-2024 11:05:12 UTC] PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/ClonedSites/ApiCommunication.php:30 Stack trace: #0 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/class-wpml-tm-ate-api.php(707): WPMLTMATEClonedSitesApiCommunication->handleClonedSiteError() #1 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/class-wpml-tm-ate-api.php(720): WPML_TM_ATE_API->request() #2 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/class-wpml-tm-ate-api.php(367): WPML_TM_ATE_API->requestWithLog() #3 [internal function]: WPML_TM_ATE_API->get_languages_supported_by_automatic_translations() #4 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/CachedATEAPI.php(41): call_user_func_array() #5 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/CachedATEAPI.php(33): WPMLTMATEAPICachedATEAPI->callWithCache() #6 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/API/ATE/LanguageMappings.php(34): WPMLTMATEAPICachedATEAPI->__call() #7 [internal function]: WPMLTMAPIATELanguageMappings::WPMLTMAPIATE{closure}() #8 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array() #9 [internal function]: WPMLFP{closure}() #10 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(50): call_user_func_array() #11 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Loader.php(130): WPMLFP{closure}() #12 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): WPMLTMATELoader::getData() #13 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPMLFPRight->map() #14 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPMLFPRight->chain() #15 /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPMLFPPromise->resolve() #16 /var/www/html/HEF/wp-includes/class-wp-hook.php(324): WPMLLIBWPHooks::WPMLLIBWP{closure}() #17 /var/www/html/HEF/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #18 /var/www/html/HEF/wp-includes/plugin.php(517): WP_Hook->do_action() #19 /var/www/html/HEF/wp-settings.php(722): do_action() #20 /var/www/html/HEF/wp-config.php(106): require_once('...') #21 /var/www/html/HEF/wp-load.php(50): require_once('...') #22 /var/www/html/HEF/wp-admin/admin.php(34): require_once('...') #23 /var/www/html/HEF/wp-admin/index.php(10): require_once('...') #24 {main} thrown in /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/ClonedSites/ApiCommunication.php on line 30

Symptoms:
PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/html/HEF/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/API/ClonedSites/ApiCommunication.php:30

Questions:
How can I resolve the PHP Fatal error after updating WPML to the latest version?

August 7, 2024 at 12:19 pm
August 7, 2024 at 1:53 pm #16048419

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I took a copy of your site with the Duplicator plugin and then removed it. I escalated this issue to our second-tier supporters. We will keep you updated here with any news regarding this issue.

I appreciate your patience.

Regards,
Itamar.

August 8, 2024 at 3:52 pm #16053688

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Our second-tier supporter debugged this issue and discovered that it was caused by the Codevz Plus Plugin you are using on your site. Here is our second-tier supporter explanation of the problem.

I found it is the Codevz Plus Plugin plugin. It has a code that explicitly blocks the wpml.org domain.

In wp-content\plugins\codevz-plus\codevz-plus.php:L270 it has this code:

	// Speed up WordPress dashboard.
	public function pre_http_request( $false, $parsed_args, $url ) {

		$blockedHosts = [
			'wpbakery.com',
			//'elementor.com',
			'gravatar.com',
			//'jetpack.com',
			'facebook.com',
			'fbcdn.net',
			'twitter.com',
			'github.com',
			'yoast.com',
			'yoa.st',
			'rankmath',
			'unyson.io',
			'siteorigin',
			'wp-rocket',
			'cloudflare.com',
			'jetbrains.com',
			'wpengine.com',
			'acfpro.com',
			'advancedcustomfields.com',
			'wpforms.com',
			'gravityforms.com',
			'wordpress.com',
			'ipify.org',
			'ipecho.net',
			'woocommerce.com',
			'wc.com',
			'tnedi.me',
			'tablepress.org',
			'akismet.com',
			'contactform7.com',
			'wpml.org'
		];

		foreach ( $blockedHosts as $host ) {

			if ( ! empty( $host ) && self::contains( $url, $host ) ) {

				return [
					'headers'  => '',
					'body'     => '',
					'response' => '',
					'cookies'  => '',
					'filename' => ''
				];

			}

		}

		return $false;

	}

See the wpml.org domain.
The plugin should be removed for WPML to work.

To work with WPML, you should deactivate this plugin. Alternatively, you can comment out wpml.org from the list. The same as you did with:

//'elementor.com',
//'jetpack.com',

So that you know, the Codevz Plus Plugin is not officially compatible with WPML. It is not on our list here - https://wpml.org/plugin/. Please contact the authors and urge them to join our Go Global Program. You can find details about it here.

https://wpml.org/documentation/theme-compatibility/go-global-program/

We will happily cooperate with the authors to make their plugin officially compatible with WPML.

Regards,
Itamar.

August 11, 2024 at 6:34 am #16059053

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

For your information, we have published an errata about this case.

https://wpml.org/errata/codevz-plus-php-fatal-error-uncaught-typeerror-cannot-access-offset-of-type-string-on-string-in/

Regards,
Itamar.

August 11, 2024 at 6:54 am #16059059

ammarA-18

Hi,

Thanks for discover the issue and Codevz Plus Plugin has publish update to fix the problem (Version 4.9.7.1).

Thank you and best regards,