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 thread is resolved. Here is a description of the problem and solution.

Problem: Suddenly I realized that my main page doesn’t have the language switcher anymore. The German translation of the front page is 100% complete. But on the page overview there it still shows a “+”. And I see this error: An error of type E_ERROR was caused in line 130 of the file /home/philipps/public_html/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 Solution: This solution does the trick:

  • go to Dashboard → WPML → Support;
  • press the troubleshooting link;
  • use the Remove ghost entries from the translation tables option;

This topic contains 17 replies, has 2 voices.

Last updated by philippS-34 4 months, 2 weeks ago.

Assigned support staff: Radu.

Author Posts
May 22, 2019 at 8:41 am

philippS-34

I am trying to:

Suddenly I realized that my main page doesn’t have the language switcher anymore. The German translation of the front page is 100% complete. But on the page overview there it still shows a “+”

I searched for hours and didn’t find a solution. So I just renewed my license to get the updates. The problem is still there - it even got worth. Now, the part/box from the front page where I describe my mission is not showing up on the translation page. Before the update it was there.

Link to a page where the issue can be seen:
hidden link
I expected to see:
Language switcher English/German

Instead, I got: no switcher on top

Can you please login and have a look at it? Cause if I need to follow once more all these instructions I will get a nervous breakdown

May 22, 2019 at 9:10 am #3863431

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Philipp,

Thank you for reaching out the WPML support!

I just checked the pages in German and I could see that these are all of them hidden link. Can you tell me which one if the translation of the English homepage, please? I just want to have a look at it and see what can be done in order to be displayed well.

Thanks,
Radu

May 22, 2019 at 9:55 am #3864045

philippS-34

Thanks for your prompt reply.

I am talking about the mainpage. Please find image attached.

May 22, 2019 at 9:57 am #3864071

philippS-34

Sorry can’t upload images on mobile 🙁
The English page is called

Home - Front Page

If you click on the + you will see that on the German translation 100% is marked complete

May 22, 2019 at 9:59 am #3864089

philippS-34

Also before the plugin update there was the translation of this text:

MY MISSION
TO CREATE FASHION PIECES WITH UNIQUE DESIGNS THAT FIT TO YOUR PERSONALITY.
KEEPING THE PRODUCTION LOCALLY, ETHICALLY AND ENVIRONMENTALLY FRIENDLY.

Now this text even isn’t available for translation on the front page 🙁

May 23, 2019 at 5:04 am #3871111

philippS-34

Hej! Would be great to get an update on this

May 23, 2019 at 7:15 am #3871983

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Philipp,

I checked your page a couple times but the page crashes when I'm trying to edit a simple block (like the one with the Get your personal scarf. text, for example). Can you tell me if this is happening on your side too, please? Also, can you deactivate all the plugins (except for WPML), change the theme to a default one (like Twenty Nineteen), create a new page and translate it? Are things working fine this time? I just want to make sure that this is not an issue caused by one of the plugins or the theme that you're using.

Thanks,
Radu

May 23, 2019 at 7:33 am #3872087

philippS-34

Yes it does happen too. Can’t change the theme right now, since I sent out mails to prospects that might visit today. Only can do this tonight.

But since I am using my theme and your plugins since years and also all the other plugins this seems rather rare.

Maybe this helps

Error Details
=============
An error of type E_ERROR was caused in line 130 of the file /home/philipps/public_html/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 /home/philipps/public_html/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php on line 107 and defined in /home/philipps/public_html/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php:130
Stack trace:
#0 /home/philipps/public_html/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 /home/philipps/public_html/wp-includes/class-wp-hook.php(288): WPML_Media_Post_Images_Translation->translate_images(10721)
#2 /home/philipps/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#3 /home/philipps/public_html/wp-includes/plugin.php(46

May 24, 2019 at 8:08 am #3882111

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Philipp,

Can you tell me where (or when) did you see this error message, please? Also, can you deactivate the WPML Media plugin and tell me if things are different now? I'm asking for this because this error seems to come from this plugin and we can try to see if there's any difference when not using it.

Thanks,
Radu

May 27, 2019 at 5:57 pm #3900143

philippS-34

Hi,

When you generated the error message on my site, wordpress sent me an email with mentioning this error.

May 27, 2019 at 6:47 pm #3900313

philippS-34

Ahhhrghh...that's terrible. I deactivated the plugin in my front page got all messed up. Now, I activated the plugin again and it's till a mess 🙁

May 27, 2019 at 6:47 pm #3900337

philippS-34

Please fix this as soon as possible.

May 29, 2019 at 8:27 am #3913113

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Philipp,

Have you made any changes to the homepage while deactivating the WPML Media plugin, please? Also, have you tried to edit the homepage and try to edit the elements to make them look fine again? Last but not least, while the Media plugin was deactivated, did the error come out again?

Thanks,
Radu

May 29, 2019 at 9:30 am #3913907

philippS-34

Hej!

Here is what I did:

- you asked me to deactivate the media plugin, I did.
- front page got all messed up.
- wrote you about it
- you got back today
/::::
I was able to fix it. Deactivating the media plugin caused to turn a two column into one column. That’s why it got messed up. Strange that this happened not to all columns on the front but only to the one.

I saved it.

Tried to safe an edit on the front page and it worked. When the plugin is deactivated. So I didn’t get a message.

When activated I get the message.

May 29, 2019 at 1:50 pm #3916175

philippS-34

Any news on this?