Skip Navigation

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

Problem:
PHP Fatal error: Uncaught TypeError: str_contains(): Argument #1 ($haystack) must be of type string, array given in ...m/wp-includes/blocks.php:1409 When enabling "Scellius for WooCommerce" plugin with PHP 8

Solution:

The error was happening due to the settings being corrupted.

To fix this, We went to the site database wp_options table and searched for the option name "woocommerce_scelliusstd_settings" and renamed it to "woocommerce_scelliusstd_settings_old", this stored the plugin settings.

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.

This topic contains 14 replies, has 2 voices.

Last updated by Shekhar Bhandari 3 months, 4 weeks ago.

Assisted by: Shekhar Bhandari.

Author Posts
July 8, 2024 at 7:13 am

romainO-2

Background of the issue:
Content in different languages ​​is reversed when WPML is deactivated: the English translated language is displayed instead of the French source language for the divi Builder layouts (footer, posts, etc.).
Clearing WP cache has no effect.

Symptoms:

Questions:

July 8, 2024 at 8:48 am
July 11, 2024 at 4:06 pm #15936476

romainO-2

Hello,

First, let me remind you the issue, which is not the one described in the topic name :

I have disabled WPML because when the client is at the paiement step, it causes a critical issue, on this website : hidden link

You asked me to copy the site on a test server, what I did : hidden link

I have enabled WPML plugins, and now there is no critical error any more when processing to paiement. I don't understand because this site is the exact copy of the first one.

Is there any WPML cache settings that we could try to clean ?

Also, the hosting provider is not the same. The site with the issue is using Cloudflare CDN. Could it be the reason ?

July 12, 2024 at 9:53 am #15941501

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Could you please go to WPML-> Support ->Troubleshooting and click the below button:

+ Clear Cache in WPML

Also, I suggest you to disable cloudfare CDN for testings and see if it helps, also, can you check if php versions are same on testing site.

Thanks

July 12, 2024 at 2:16 pm #15942936

romainO-2

Hello,

Yes, you were right, the php version was 7.4 in the test site (working well), and 8 in the bugging site.
I have set version 7.4 on the live website and it seems to work, even if it is much less rapid.

I have set php 8 on the staging website and got this error :
Not Implemented
GET not supported for current URL.
Additionally, a 501 Not Implemented error was encountered while trying to use an ErrorDocument to handle the request.

I rolled back to 7.4. Can you help me find the reason why php8 is triggering errors when WPML is enabled ? I can provide full access of the test site and PHP. You can make any test.

July 12, 2024 at 3:15 pm #15943211

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello,

Sure, please provide me the login access for the test site.

Look forward to your reply.

Thanks

July 15, 2024 at 1:03 pm
July 15, 2024 at 2:31 pm #15954964

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Can you upgrade to php 8 on the testing site? also, can you confirm if the issue is still existing on checkout page?

Look forward to your reply.

Thanks

July 15, 2024 at 3:34 pm #15955417

romainO-2

Hello

Done
The issue is only visible on cart page (just checked again).

July 15, 2024 at 5:06 pm #15955890

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I noticed the error only occurs when "Scellius for WooCommerce" plugin is enabled, I have asked for feedback from our 2nd tiers regarding the error, but you can also reach out to the plugin author and ask if they can check this once.

I will update once I will receive any feedback from the 2nd tier.

Thanks

July 16, 2024 at 9:12 am #15959387

romainO-2

Hello,

I have sent the error details to the "Scellius for WooCommerce" dev team.

Romain

July 16, 2024 at 1:04 pm #15960657

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Can you also ask them if it's possible to setup this plugin for testing purposes, if yes, please ask for details so we can check if this happens on fresh installation.

Look forward to your reply.

Thanks

July 16, 2024 at 1:11 pm #15960706

romainO-2

Ok just asked.

July 16, 2024 at 1:28 pm #15960813

romainO-2

I got there response :they don't know about this error. Never observed before.
The plugin is open source, you can test it : hidden link

July 16, 2024 at 1:53 pm #15960987

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

It looks the error is happening due to the settings being corrupted, if you visit this url even without WPML, hidden link, then you can see the settings are loading with a fatal error.

To fix this, I went to your site database and wp_oli_options table and searched for the option name "woocommerce_scelliusstd_settings" and renamed it to "woocommerce_scelliusstd_settings_old", this stored the plugin settings, so I set the plugin settings once again from woocommerce->settings and I couldn't see the problem.

Can you please check and try this, please make sure to create a backup before procedding.

Look forward to your reply.

Thanks