Resolved
Reported for: WPML Multilingual CMS 3.6.2
Resolved in: WPML 3.6.3
Overview of the issue
Currently, there appears to be some issues with parent-child relationships between custom post types in the plugin Types, when WPML is used.
Saving a post that has such a relationship may lead to loss of data.
We are currently working on resolving this issue.
Workaround
As a very crude workaround that will prevent the loss of data in old posts you can edit the relationship.php file found in the ../wp-content/plugins/types/library/toolset/types/embedded/classes/ folder.
Comment out the row 305:
$updated_id = wp_update_post( $post_data );
Please note that this is only to prevent loss of data in already existing posts. This will not have an effect on new posts that you create. It is recommended to wait for the official fix.
Any news?
Hi Davide,
Yes: we will release the fix in the upcoming 3.6.3 version of WPML.
We will also release a beta with that fix very soon.
Can we receive the fix today?
Or, maybe, at least, is it possible to go back to the previous version of the plugin without any bad impact on the system?
Can you explain us how to reinstall the previous version of the plugin without losing data?
Thanks!!
Hi Davide – I replying to you about the fix now https://wpml.org/forums/topic/urgent-bug-types-wpml-data-loss-again-post-relationships-problems/
Hi,
the “fix” you sent me, that seems to be just the same beta I can easily download from your website 3.6.3-b1, DON’T FIX THE PROBLEM.
And it’s not just “my” case. I mean. I replicated the easy many-to-many relationship example you can find on types website (here: https://toolset.com/documentation/user-guides/many-to-many-post-relationship/) and as I explained in my post on the forum (https://wpml.org/forums/topic/urgent-bug-types-wpml-data-loss-again-post-relationships-problems/) when you update an Event in Italian (my first, default language) then all Appearances magically disappears and goes to the same Event in English (my secondary language)! This is the problem.
Can you replicate it?
Do you see it?
Please to it first of all!
Then…please…FIX IT!!!!!!!!!!!!!!!
All website with WPML and TYPES are actually losing datas!
THIS IS A HUGE BUG! I mean, actually WPML is NOT COMPATIBLE with Toolset TYPES!
Please do something now.
I really want to be sure you realized the problem I found out.
Here’s how to replicate it:
1) install wordpress
2) install TYPES
3) install WPML + string translation + translation management
4) set Italian as DEFAULT language and English as another language
5) create a many to many relationships following exactly this exmaple: https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
6) create some Bands and their english translation
7) create some Events and their english translation
8) open an Event (in DEFAULT language!) and relate some bands (create Appearances) to this event
9) click Update and…BOOM!!! Magically all Appearances “disappears”
10) have a look at the same Event in English (secondary language) and you can see all the appearances have not really disappeares, they magically moved to English!!!!
THIS IS THE BUG as I explained you in my first post here and again hundred times.
Am I clear enough? Can you understand me?
Can you see the problem?
Can you see that the new development version you sent me is still not solving the problem?
PLEASE LET ME KNOW ASAP!
THANKS
Hello,
Please let me try to explain.
You have a custom post type that was not set as translatable and not translated – ‘Appearances’
In Types – you can have currently only one child or parent of the same custom post type in the relationship – so the problem that you were experiencing was because you duplicate, and the values for the relationship was overwritten with the latest value (the new duplicate post) – and they went assigned to the duplicated post.
In order for this to work correctly – you need to have all custom post types translated, and after you create the parent “Appearance” – you need to translate to the other languages first, and then translate the child posts from Bands or Events.
I hope that you understand me.
WP 4.7.1
Enfold 3.8.4
Hallo,
nach Installation von WPML ist die gesamte WordPress Oberfläche in English. Sprache lässt sich unter WordPress-Einstellungen nicht mehr umstellen. Default-Sprache in WPML Einstellungen ist Deutsch.
Bitte um Hilfe.
What is going on with this, is it fixed? I am having some strange occurances using toolset, wpml and genesis integrations.
Hello, the issue mentioned in this ticket should be fixed since WPML 3.6.3
If you have some issues related to the same or other similar problem, then please open a new ticket in our support forum so that our specialists could investigate them.