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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: America/Los_Angeles (GMT-07:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Bobby 1 year, 1 month ago.

Assisted by: Bobby.

Author Posts
March 9, 2023 at 4:25 pm #13209625

Klaus Eder

I am trying to:
Edit a Tutor LMS Course Page with Elementor, but the Editor Crashes with below error message probably related to PHP Version 8.1

PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /var/www/thefilleracademy.com/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/Hooks/GutenbergCleanup.php:72

I already applied this fix: https://wpml.org/errata/elementor-php-8-fatal-error-uncaught-typeerror-json_decode/

which works, but leads to the above error on some pages.

March 9, 2023 at 11:57 pm #13212205

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

just to verify -- you were first getting this error:

Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in …/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/DataConvert.php:22

for which you used our errata workaround resolving it but after applying the solution you started getting this new error?

Are the pages you get this error random or related in any way? Are they all Tutor LMS related possibly?

March 10, 2023 at 12:04 am #13212215

Klaus Eder

Hey,

yes - exactly.

Don't know if the error happens on other pages as well, but my guess it's related to the same stuff that the errata addresses. It has something to do with elementor pages where content is added before first opening it with elementor. As reverting to PHP 7.4, opening and saving the page in Elementor once, switching back to PHP 8.1 elementor works again on the same page with PHP 8.1. Older Course Pages from Tutor work fine as well to be edited with Elementor, only newly created ones that haven't been edited with elementor yet cause this problem.

March 10, 2023 at 9:20 pm #13220883

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you for confirming, if possible update WPML from 4.5.14 to 4.6 and let me know your results -- the latest version had depreciations with PHP 8 addressed.

Let me know your results, please.

If the issue still persists with 4.6.0 I would like to request temporary access (wp-admin and FTP) to your site to test the issue.
(preferably to a test site where the problem has been replicated if possible)

**Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken **

I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/
You will find the needed fields for this below the comment area when you log in to leave your next reply.
The information you enter is private which means only you and I have access to it.

NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin.

Thank you,
Bobby

March 14, 2023 at 1:22 am #13237767

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Thank you, I have escalated this to our team and we will update you here once there is news.

March 31, 2023 at 6:46 am #13372439

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

Please try the following workaround and let me know your results

go to wp-content/plugins/tutor-lms-elementor-addons/classes/AssetsManager.php

change from:

update_post_meta( $postID, '_elementor_data', $elementorData['layout'] );

to:

update_post_meta( $postID, '_elementor_data', json_encode($elementorData['layout']) );

The topic ‘[Closed] Fatal Error on GutenbergCleanup – PHP 8’ is closed to new replies.