Skip Navigation

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 10 replies, has 2 voices.

Last updated by Carlos Rojas 1 year, 6 months ago.

Assisted by: Carlos Rojas.

Author Posts
September 29, 2022 at 9:34 pm #12153029

Chainalysis

I am trying to:

Edit a page where a translation is in progress.

Link to a page where the issue can be seen:

hidden link

I expected to see:

No errors.

Instead, I got:

A PHP error:

Deprecated: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero in /app/wp-content/plugins/sitepress-multilingual-cms/classes/notices/wpml-tm-post-edit-notices.php on line 326
October 3, 2022 at 12:15 pm #12170255

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hello,
Thank you for contacting us

I kindly ask you to follow these steps:
- Create a full backup of the site
- Contact your hosting providers and ask them to downgrade the PHP version to v7.4
- Double-check if the issue disappeared

Could you tell me the results?

Regards,
Carlos

October 3, 2022 at 12:52 pm #12170717

Chainalysis

Hi Carlos, thank you for your reply. I tested this as you suggested, and in PHP 7.4, this deprecation warning does not appear.

Is this a known bug where the code in `wpml-tm-post-edit-notices.php` is not yet fully compatible with PHP 8.x?

As you probably know, PHP 7.4 only has security support now, and this will end on 28 Nov 2022, after which there will be no further fixes for security exploits for PHP 7.4. More info here:

hidden link

October 3, 2022 at 12:57 pm #12170759

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there,

I'm aware of this issue in other plugins and themes -in the WordPress environment- and the solution is to downgrade to v7.4. Our developers are working continuously on improving the code of the plugin so this issue should be solved soon 🙂

Regards,
Carlos

October 3, 2022 at 1:43 pm #12171201

Chainalysis

Thank you, Carlos. If it matters, it seems that WPML is the only plugin or theme that we have with this problem, we've started to rely on PHP 8.0 features in some of our theme code (not much but still some), and our security team might have things to say if we ask to downgrade to PHP 7.4 now that it won't be receiving security updates anymore.

I look forward to the fix!

October 4, 2022 at 7:05 am #12174623

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there,

Could you create a staging site with a copy of the live site and ask your hosting providers to downgrade to PHP v7.4 just to double-check if the issue is solved? If necessary, I will request the credentials to the staging site to take a closer look and check the error.

Regards,
Carlos

October 4, 2022 at 11:25 am #12176599

Chainalysis

Hi Carlos, you asked to downgrade to PHP to see whether the issue goes away, right?

Yes, it does — the problem exists in PHP 8 but not in PHP 7.4.

You wrote that you’ve advised people to downgrade to PHP 7.4 in the past when they’ve run into this error, which suggests that this is a known bug in WPML’s PHP 8 compatibility, which affects multiple customers.

Are the WPML developers working on a bug fix?

October 4, 2022 at 1:21 pm #12177341

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there,

Yes, our development team is aware of this warning message and is working on a solution. This issue was already escalated to our development team 🙂

We don't have an ETA, but this issue should be solved by the next release of the plugin.

Is there anything else I can help you with?

Best regards,
Carlos

October 4, 2022 at 1:46 pm #12177553

Chainalysis

Thank you, Carlos. Then that's all for now. I look forward to the bug fix.

October 4, 2022 at 1:46 pm #12177561

Chainalysis

Awaiting the bug fix!

October 4, 2022 at 3:32 pm #12179083

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

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

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.

Have an excellent day!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.