[Resolved] Usage of translated content templates not saved to admin dot php
This thread is resolved. Here is a description of the problem and solution.
Problem:
The customer was trying to display translated content with the same content template layout as the original language for a custom post type called 'events'. However, the content template ('CT for events') was not being saved for the translations, and it kept reverting to 'Template Dynamically Assigned…', causing the front-end display to be incorrect.
Solution:
We instructed the customer to manually assign the content template for the translated events. The solution involved:
- Navigating to Toolset > Content Templates.
- Editing the content template for Events in English.
- Switching to the Dutch language in the admin top bar.
- Selecting the custom post type (CPT) 'Event' in the content selection in the right sidebar and saving it. This procedure resolved the issue, ensuring that the correct content template was applied for the translations. The customer confirmed that the solution worked and planned to replicate it for other events.
We will probably need access to your site to be able to investigate, is that okay?
Let me mark your next reply as private so that we can get log-in credentials from you—you may want to create a temporary admin user for us to use that you can later delete. And be sure to have a current backup of your site.
I've been debugging this issue but I haven't found a solution yet.
I'd like to ask permission to make a copy/staging version of your site where I can debug this closely without affecting the live site.
I'll make sure to delete this copy as soon as we get this issue fixed.
I'm afraid of debugging directly on the live site and cause issues to your visitors. Also, it is important to test a different setup as part of the troubleshooting.
Sure, go ahead, I would also prefer not to impact the users, the site is slow enough as it is 😉
This is a passion project, done by a non-programmer...
Thanks for helping out!
Hein
I was able to fix the issue by following this procedure:
- Go to Toolset > Content Templates
- Edit the template for Events in English
- Switch to Dutch in the admin top bar
- In the content selection in the right bar, please select the CPT Event and save it
After that, I edited the Dutch template using the advanced translation editor just as a test, I made a small change and saved it to make sure that it wouldn't reset my steps above and the template remained correct.
Can you please check it and confirm it is working for you?
The problem I am trying to solve is not in the translation of the Content Templates.
The problem is within my custom post-type called 'events'. In the english version of an event the CT is saved as 'CT for events', which is the correct template.
The problem that I have is that I cannot seem to save that CT choice in the translations of 'events'. It always reverts to 'Template Dynamically Assigned...'.
Because of that the front end is wrong. I gave you two links above to verify the difference.
Sorry, i jumped to conclusions.
Yes, the CT seems to be implemented correctly now.
I will now try to reproduce your solution on another event.
Thanks for the great support.
heinP confirmed that the issue was resolved on 2024-09-03 07:34:36.
This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.