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

Last updated by Dennis 11 months, 2 weeks ago.

Assigned support staff: Dennis.

Author Posts
June 22, 2019 at 12:08 pm #4071031


I am trying to:

I need to update a post(custom post type created by another plugin called "logo showcase", and a error message show as below:

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 /home/sitename/public_html/test/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php on line 107 and defined in /home/sitename/public_html/test/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php:130 Stack trace: #0 /home/sitename/public_html/test/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/sitename/public_html/test/wp-includes/class-wp-hook.php(288): WPML_Media_Post_Images_Translation->translate_images(17614) #2 /home/sitename/public_html/test/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #3 /home/sitename/public_html/ in /home/tm/public_html/test/wp-content/plugins/wpml-media-translation/classes/media-translation/class-wpml-media-post-images-translation.php on line 130

Link to a page where the issue can be seen:
the page is happens when I click update button.

I expected to see:
I need to update some information, but it doesn't work, if I uninstall wpml media, the function works fine.

Instead, I got:
an error message, please see attachment.

June 24, 2019 at 3:11 am #4074213



Welcome to WPML Support forum.

Could you please try these steps and see if it resolves the issue?

Note: Please make sure to make a complete backup of your site before proceeding.

-Go to WPML>>Support page
-Click on Troubleshooting link (link in the middle of the page)
-In Troubleshooting page, please click on the following options of 'Clean up' section. Wait for confirmation of processing after each one.
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Set language information
- Assign translation status to duplicated content
- Fix terms count
- Fix post type assignment

Please let me know how it goes.

Kind regards,

The topic ‘[Closed] when I tried to update a post(custom posty type), it shows a fatal error’ is closed to new replies.