For those of you who encountered the missing posts/pages after upgrading your WPML plugin to 1.8.0 version, then this following solutin might be help you. Since WPML changed the element_type value of post and page in the icl_translations table, ie each into post_post and post_page, then you have to adjust this value at the element_type field. After doing comparison to several version of WMPL, I found out that this changes happened since WPML version above 1.7.7. In version 1.7.7, this field was still using post and page instead of post_post and post_page. Actually, when you upgrade your WPML to 1.8.0, this value will be automatically adjusted to the new value. But, in some cases, there are some websites that do not automatically turn to the new value, especially if they deactivate and activate the plugin manually (because they upgrade by replacing the files manually, and not using the auto-update feature).
- Go to your cPanel of your website, then choose phpMyAdmin.
- Choose your WordPress database, and backup your database (as we will modify one of the tables of this database).
-
Click on the SQL tab, and then copy and paste this following SQL update:
UPDATE wp_icl_translations t, wp_posts p SET t.element_type = 'post_page' WHERE p.ID = t.element_id AND p.post_type = 'page'; UPDATE wp_icl_translations t, wp_posts p SET t.element_type = 'post_post' WHERE p.ID = t.element_id AND t.element_type = 'post';
Assuming that the prefix of your table is wp_.
Those 2 statement will update your wp_icl_translations table by replacing “post” become “post_post” for the posts you have already had, and then also replacing “post” become “post_page” for the pages you have already had. - Check again your site, and now the posts or your pages will appear properly.
- If the problem still remains, then it usuallay caused by the older version of WordPress does not support to use WPML version 1.8.0. I have contacted WPML guru about this problem, and still waiting for the solution. Meanwhile, you can try those solutions above.
Hope it helps!

I get this error running your script:
Did you run both SQL at one time or each SQL at one time?
Make sure you run both SQL at one time execution, with the order as described above.
I think this might be the problem with my site. However, I also couldn’t get the script to run. Same error. I also couldn’t understand your recommendation to run both SQL at one time execution. Can you elaborate. Thanks.