Skip Navigation

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

Problem: I've got warning with Striking MultiFlex theme

Warning: md5() expects parameter 1 to be string, array given in /var/www/walsteds.dk/public_html/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php on line 211

Solution:

A temporary fix to your theme to avoid the warning. In wp-content/themes/striking_r/framework/functions/common.php on line 78 I have changed the following

	$logo=wpml_t(THEME_NAME, 'Logo Image Source', theme_get_option('general','logo'));

to

	$logo=theme_get_option('general','logo');

50% of people find this useful.

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.

Our next available supporter will start replying to tickets in about 3.63 hours from now. Thank you for your understanding.

This topic contains 12 replies, has 3 voices.

Last updated by Paul 4 years, 7 months ago.

Assisted by: Andrey.

Author Posts
November 22, 2019 at 12:07 pm #4997515

BAC

Hi,

I'm getting this error:

Warning: md5() expects parameter 1 to be string, array given in /var/www/walsteds.dk/public_html/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php on line 211

November 22, 2019 at 3:08 pm #4999433

BAC

Any help here?

November 24, 2019 at 9:18 pm #5007773

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I’m sorry that you ran into trouble with this! I’ll need a little more information to see what’s happening here.

Could you show me on the screenshot where are you getting this error? Does the issue happen if you temporarily deactivate all plugins except WPML?

I would strongly recommend updating the PHP version on your server to meet the minimum requirements.
https://wordpress.org/about/requirements/

November 25, 2019 at 7:20 am #5008599

BAC

Hi,

Yes, I've marked the error and tried disabling all plugins except WPML and that didn't help: hidden link

Skærmbillede 2019-11-25 kl. 08.17.06.png
November 25, 2019 at 9:41 am #5009517

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I need to request temporary access (wp-admin and FTP) to your site – preferably to a test site where the problem has been replicated if possible – in order to be of better help. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

If I need to further debug the problem, I’d like to ask you about a possibility to replicate your site locally. For this, I'll need to temporarily install a plugin called "Duplicator" on your site. This will allow me to create a copy of your site and your content. If you prefer to do it on your own, you can provide me with the snapshot and just send me the installer file and the zipped package you downloaded.

Let me know how you feel about this.

November 26, 2019 at 9:41 pm #5025277

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

Thank you for the access details. I've checked the issue but I don't see an obvious reason for this to happen.

I’d like to ask you about the possibility to replicate your site locally. For this, I'll need to temporarily install a plugin called "Duplicator" on your site. This will allow me to create a copy of your site and your content. If you prefer to do it on your own, you can provide me with the snapshot and just send me the installer file and the zipped package you downloaded.

Let me know how you feel about this.

November 27, 2019 at 7:54 am #5026421

BAC

Hi,

Yes, you can do that.

November 27, 2019 at 4:41 pm #5031261

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

OK thanks. I will keep you posted.

November 29, 2019 at 12:07 pm #5042885

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I have debugged this issue and it appears that's something that has to be fixed on the theme side. I will report about this to the compatibility team and they will report to the theme's author afterward.

In the meantime, I have added a temporary fix to your theme to avoid the warning. In wp-content/themes/striking_r/framework/functions/common.php on line 78 I have changed the following

	$logo=wpml_t(THEME_NAME, 'Logo Image Source', theme_get_option('general','logo'));

to

	$logo=theme_get_option('general','logo');
November 29, 2019 at 1:08 pm #5043219

BAC

Hi,

Okay, thanks! Can I uninstall the plugin you installed an delete your login now?

November 29, 2019 at 1:22 pm #5043287

Andrey
Supporter

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+02:00)

I have done it already. Have a nice weekend!

April 8, 2020 at 6:42 am #5862849

BAC

Hi,

We have the same problem again after updating the theme to latest version! Did you not report the issue to the theme developers - or did they not care to fix it?

August 25, 2020 at 9:26 am #6866651

Paul

This bug has never reached us as it has not bene reported to us in our support forum.

It will be solved in the next build v 2.10

please change the code in the common.php to this

function theme_get_logo(){
	$logo=wpml_t(THEME_NAME, 'Logo Image Source', json_encode(theme_get_option('general','logo')));
	if (!is_array($logo)) $logo=json_decode($logo);
	if(is_object($logo)){
		return (array)$logo;
	} else {
		return $logo;
	}
}

function theme_get_mobile_logo(){
	$logo=wpml_t(THEME_NAME, 'Logo Image Source For Mobile Devices', json_encode(theme_get_option('general','mobile_logo')));
	if (!is_array($logo)) $logo=json_decode($logo);
	if(is_object($logo)){
		return (array)$logo;
	} else {
		return $logo;
	}
}

The Striking team
Theme Support.
BackuPs

wpml-issue-encoding.png