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

Last updated by John Hobson 1 year, 1 month ago.

Assigned support staff: Lauren.

Author Posts
June 7, 2019 at 12:05 pm

John Hobson

I am trying to:

Save a page

Link to a page where the issue can be seen:

hidden link

I expected to see:

The post saved

Instead, I got:

Fatal error: 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 /var/sites/d/dev.ecozone.com/public_html/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php on line 107 and defined in /var/sites/d/dev.ecozone.com/public_html/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php:130 Stack trace: #0 /var/sites/d/dev.ecozone.com/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 /var/sites/d/dev.ecozone.com/public_html/wp-includes/class-wp-hook.php(288): WPML_Media_Post_Images_Translation->translate_images(3470) #2 /var/sites/d/dev.ecozone.com/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters in /var/sites/d/dev.ecozone.com/public_html/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php on line 130

June 7, 2019 at 3:18 pm #3977401

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

Please be sure to make a full backup of your site and database.

Then, go to WPML -> Support -> Troubleshooting.

Look for 'Clean up' and click the following:
- Synchronize posts taxonomies
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Fix Terms count
- Fix post assignment for translations

Does this resolve the error message?

June 7, 2019 at 3:51 pm #3977561

John Hobson

That resolved the issue, many thanks!