I am trying to edit an employee profile and associate that profile to the services she offers.
Everything works great for the primary language (English) but I soon as I update the translation of the employee profile, the relationships is only displayed on translated version (and is dropped from the original version).
I checked in the database and indeed, the post_meta related to the intermediate post that sets the association between the employee and the service is updated to refer to the post id of the translation. This is coherent with the behavior observed on the front end.
Link to a page where the issue can be seen:
hidden link
hidden link
I'm expecting to see the post associations working on both the original and the translated content and I'm not sure what should be the normal state of the database for this to happens properly.
Help would be greatly appreciated.
François
This seems like a problem with the translations of the posts.
Let me elaborate how it should be setup, so you can control this to make sure it's not a misconfiguration.
1. If you plan to translate your Posts (Parent, or Child) you need to translate as well the associated posts and their Intermediates, or the connections will not work as expected.
2. This means, you need to set as translatable, and translate, the Parent, Intermediate and Child Post Type.
3. Then, you create the Relationships in the primary language and translate each post to the secondary language.
All Plugins must be up to date to have this working, as there where bugs in past with these exact issues.
The plugins seem up to date on your install, I am just mentioning this in case I missed any.
Please let me know if with above steps you can solve the problem.
If not, please submit me a Copy of your site if possible:
https://toolset.com/faq/provide-supporters-copy-site/
I can then try to replicate it and find what is the issue.
Hello,
After further testing, I believe I made some progress.
I'd like to confirm with you my understanding.
Given the following relationship: EmployeeProfile(en) <-> ServiceOfferedByEmployee(en) <-> Service(en)
I need to translate all 3 posts
e.g.
EmployeeProfile(fr) <-> ServiceOfferedByEmployee(fr) <-> Service (fr)
Please confirm that Toolset will NOT create ServiceOfferedByEmployee(fr) automatically, based on the ID of the post translation EmployeeProfile(fr) and post translation Service (fr), and that ServiceOfferedByEmployee(fr) need to exist and be linked to ServiceOfferedByEmployee(en) as the translation.
Now I'm wondering about the workflow as the way I am doing things seems to be very inefficient...
When translating ServiceOfferedByEmployee(en) to ServiceOfferedByEmployee(fr), I follow these steps :
- Initial state: EmployeeProfile(en) and Service(en) have already been translated to EmployeeProfile(fr) and Service (fr) and the relationship for the english version have been established.
- I click "edit" on the EmployeeProfile(en)
- I scroll down to the relationship to edit "ServiceOfferedByEmployee(en)" and I click the small edit button next to it on the right
- I'm being redirected to the edit page of the post relationship ServiceOfferedByEmployee(en) and I click the plus sign in the sidebar to create a new translation, ServiceOfferedByEmployee(fr)
- In the translation editor, I "copy all fields" [title and URL], and I check all "translation is complete" boxes. I then save and close
- I'm then redirected back to the edit ServiceOfferedByEmployee(en) screen and I select the alternative language on the wordpress top menu bar
- The "post relationship" section shows up empty, and I select the translated post EmployeeProfile(fr) and Service (fr) to establish the relationship.
- I then click update
I would appreciate your opinion on this workflow...
Thank you
Yes, correct, as I elaborated here:
https://toolset.com/forums/topic/post-relationships-dropped-from-primary-language-and-transferred-to-translation/#post-608191
Nothing is created automatically or translated automatically neither in Toolset or WPML.
You need to translate all involved Post Types, and each post must be translated.
Each ID must be adjusted.
About the perfect workflow to translate relationships you should ask in the WPOML forum as the WOPML Plugin has several complex ways to translate things, and they will show you exactly what is the most efficient in a Posts Types Relationship scenario.
I would just create all posts in the default language, connect them all and then start by translating all Parent Posts , then
all Intermediary Posts.
So you can directly connect the already translated parents to the now translating intermediary post.
When I read your steps, I think you can include the Custom Field in the Translation Editor so to translate it all at once?
I am not sure if WPML allows this, please ask details on translations in the WPML Forum:
http://wpml.org/
I usually do not use the Translation Editor at all, I do not like it 🙂
But that is personal preference and a question of site's size.
Please let me know if I can help you further with Toolset!