Skip Navigation

[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.

Relevant Documentation:

https://toolset.com/course-lesson/translating-views-content-templates-archives-and-forms/

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 2.09 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 7 replies, has 3 voices.

Last updated by Mateus Getulio 1 month, 1 week ago.

Assisted by: Mateus Getulio.

Author
Posts
#2732229

Tell us what you are trying to do? Show translated content with the same content template layout as the original language

Is there any documentation that you are following?
I talked to the WPML team and they said:

For some reason the usages aren't being saved here: hidden link

Is there a similar example that we can see?
hidden link is WRONG
hidden link is CORRECT

What is the link to your site?
hidden link

I tried with another custom post type, and it is the same problem.
The content template is 'CT for events'.

#2732815

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

We should be able to help with this, but first, can you clarify how you have been attempting to translate your content template?

This page details what you should be doing: https://toolset.com/course-lesson/translating-views-content-templates-archives-and-forms/

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.

#2735020

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for sharing that information.

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.

Thank you, please let us know.
Mateus

#2735047

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

#2735716

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello 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?

Best,
Mateus

#2737646

just telling the clean up bot i still need help.
I simply did not have the time to test your suggestion yet, but will do asap.

#2737659

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.

#2738002

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

I understand, but my steps were meant to fix the front end for the CPT.

Can you please check the links you shared, they seem to be loading the same design on my end.

hidden link
hidden link

Thank you, please let us know.
Mateus

#2738394

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.