Skip Navigation

[Gelöst] Content template link lost when CPT is updated

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 4 Jahren, 4 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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+01:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von zoeS vor 4 Jahren, 4 Monaten.

Assistiert von: Jamal.

Author
Artikel
#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

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