Skip Navigation

[Résolu] Content template link lost when CPT is updated

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
The user was losing the content template after each post update.

Solution:
The content templates do not have language information attached, so when you update a post, the content template dropdown is empty and it saves "None" as the content template.

Run "Set language information" action in WPML->Support->Troubleshooting. Check this screenshot http://prntscr.com/tb73nm
Then, assign a content template to a post, make sure it is working. Save the post again and check if the content template is lost, it should not. I could have run this action, but I need to make sure a database backup is secured before.

Relevant Documentation:
https://wpml.org/documentation/support/wpml-troubleshooting-options/

This support ticket is created Il y a 3 années et 8 mois. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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

Supporter timezone: Africa/Casablanca (GMT+00:00)

This topic contains 2 réponses, has 2 voix.

Last updated by zoeS Il y a 3 années et 8 mois.

Assisted by: Jamal.

Auteur
Publications
#1697719

I have a custom post type with its own content template. When the post is created, the template is correctly assigned, but as of the last few days, when the post is updated, the link to the template is lost and we get the message about there being no content template assigned.

#1697779

Jamal
Supporter

Languages: Anglais (English ) Français (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting the Toolset support.

I suppose that you recently activated WPML, and that the content templates do not have language information attached, so when you update a post, the content template dropdown is empty and it saves "None" as the content template.

Please, ** make a database backup. ** Then run "Set language information" action in WPML->Support->Troubleshooting. Check this screenshot hidden link
Then, assign a content template to a post, make sure it is working. Save the post again and check if the content template is lost, it should not. I could have run this action, but I need to make sure a database backup is secured before.
https://wpml.org/documentation/support/wpml-troubleshooting-options/

If this does not work, I'll need to take a copy of your website for further local debugging, let me know if that is ok with you?

#1698653

Thank you Jamal, that worked! I have not recently activated WPML, it has been running alongside Types and views for the last 5 years so I don't know how the content templates lost their language information, but your solution certainly fixed it, thank you very much.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.