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

Last updated by Laura 4 months, 2 weeks ago.

Assigned support staff: Laura.

Author Posts
May 28, 2019 at 3:27 am

SThemes

I am trying to delete multiple woocommerce products, I get this error from latest version WP and WPML products. If I disable WPML media it works. WP message below....

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, WPML Media.

hidden link)

May 28, 2019 at 2:59 pm #3908239

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

thanks for contacting us.

Could you copy here the exact error you have?

May 29, 2019 at 1:14 am #3910715

SThemes

I am having trouble making it happen again. It occurred several times before I disabled WPML Media. I have reactivated that and can not get it to fail. I will keep trying. It may be a particular product or 2 that is causing trouble.
Beyond the information I posted already, WordPress error message and link what do you need. Where can I go to "copy here the exact error you have"
Wordpress goes white screen and says I can open in recovery mode as WPML Media caused an error.

May 29, 2019 at 1:24 am #3910721

SThemes

Ok I got it to happen. The white screen says....

"The site is experiencing technical difficulties. Please check your site admin email inbox for instructions."

Here is the complete error email. WP explanation of error near the end. I have broken the URL's for safety.......

Howdy!

Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

In this case, WordPress caught an error with one of your plugins, WPML Media.

First, visit your website

(<em><u>hidden link</u></em>) and check for any visible issues. Next, visit the page where the error was caught (<em><u>hidden link</u></em>) and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.

<em><u>hidden link</u></em>

To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

Error Details
=============
An error of type E_ERROR was caused in line 130 of the file /nas/content/live/xxxxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php. Error message: Uncaught TypeError: Argument 1 passed to WPML_Media_Post_Images_Translation::translate_images_in_post_content() must be an instance of WP_Post, null given, called in /nas/content/live/xxxxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php on line 107 and defined in /nas/content/live/xxxxxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php:130
Stack trace:
#0 /nas/content/live/xxxxxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php(107): WPML_Media_Post_Images_Translation->translate_images_in_post_content(NULL, Object(WPML_Post_Element))
#1 [internal function]: WPML_Media_Post_Images_Translation->translate_images(36940)
#2 /nas/content/live/xxxxxx/wp-includes/class-wp-hook.php(288): call_user_func_array(Array, Array)
#3 /nas/content/live/xxxxxx/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#

May 29, 2019 at 1:43 am #3910787

SThemes

Some additional information. I noticed a couple of things
1. previously my trash said 1 product, but there was none in the list. After this crash it said 4 products in the trash but only 2 appear in the list. (see attached image)
2. If you go to the Product list trash and select the 2 products that do appear in the list and choose the checkbox to select them all, select recover, click apply. You will also get an error. Which seems to imply it is specific maybe to certain products.

YOU should be able to login and see this error happen when you restore the 2 products in the trash. Feel free to, it is a development site not in public use.

That error email is below.......

In this case, WordPress caught an error with one of your plugins, WPML Media.

First, visit your website

(<em><u>hidden link</u></em>) and check for any visible issues. Next, visit the page where the error was caught (<em><u>hidden link</u></em>) 

and check for any visible issues.

Please contact your host for assistance with investigating this issue further.

Error Details
=============
An error of type E_ERROR was caused in line 130 of the file /nas/content/live/xxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php. Error message: Uncaught TypeError: Argument 1 passed to WPML_Media_Post_Images_Translation::translate_images_in_post_content() must be an instance of WP_Post, null given, called in /nas/content/live/xxxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php on line 107 and defined in /nas/content/live/xxxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php:130
Stack trace:
#0 /nas/content/live/xxxxxx/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php(107): WPML_Media_Post_Images_Translation->translate_images_in_post_content(NULL, Object(WPML_Post_Element))
#1 [internal function]: WPML_Media_Post_Images_Translation->translate_images(36940)
#2 /nas/content/live/xxxx/wp-includes/class-wp-hook.php(288): call_user_func_array(Array, Array)
#3 /nas/content/live/xxxx/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#[/php]

May 29, 2019 at 9:13 am #3913765

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

thanks for the explanation.

Could you try to:
1. Go to WPML > Support > Troubleshooting
2. Click on the button "Remove ghost entries from the translation tables"

And see if the situation improves? Otherwise, I'd like to take a copy of your site for further checkings.

June 6, 2019 at 11:05 pm #3972383

SThemes

Remove ghost entries did not help.
I still show 1 product in the trash but none in the trash list, 13 in drafts but none in the drafts list. I have not counted to see if live products in the list = the shown number. THE BIG ISSUE though is the repeated errors caused by WPML Media.

You already have WP login details. You can do whatever you want on the babadev site, it is not public.
You can get a copy of the site but WPengine does not allow running the backup plugin you suggest. I could supply a WPEngine backup file.

Today I found a report from the live site saying the same thing, that WPML media had caused a fatal error there. I assume when my client tried to delete a product. The error was the same one "E_ERROR was caused in line 130 etc.......

June 7, 2019 at 10:56 am #3975591

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

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

Hi,

I accessed your site and in WPML -> Support -> Troubleshooting I clicked on Fix Post Type Assignment. It found 12 records that needed to be corrected.

Now I can see the Trash issue is fixed, as it shows the exact number of items (please notice that "Trash" counts items in bot language, so if you see Trash (3) it must be 3 in All languages).

I tried to delete and restore different items and I didn't get the error, so could you please check this too and confirm it's resolved?