Skip Navigation

[Resolved] Cannot select Content Template if page default language other than site default

This support ticket is created 6 years, 11 months ago. 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.

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 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 6 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#616485
page-french.JPG
page-english.JPG

I am trying to:
Change the Content Template on a page assign as the default language other than the default language of the website.
The Content Template selection is disabled on all languages for this page (the French and English page).

The website is set to Default Language English.
The french page has been set as the original language for this page
"Make French the original language for this page"

Link to a page where the issue can be seen:
In the page editor in the admin.

I expected to see:
The Content Template drop down on the page editor enabled on the french page.

Instead, I got:
The Content Template drop down on the page editor disabled on all languages for this page (the french page and on the english page).

The problematic code is here (it doesn't check for the page original language but for the site default language)

function content_template_select_meta_box( $post ) {
...
// Works when creating a new post, where the previous one gives false positives
if ( $is_in_wpml_original_language ) {
$is_in_wpml_original_language = ( $wpml_current_language == $wpml_default_language );
}
...

<?php
if ( ! $is_in_wpml_original_language ) {
?>
<p class="toolset-alert toolset-alert-info">
<?php
echo __( 'The Content Template is copied from the original language' , 'wpv-views' );
?>
</p>
<?php
}

#616549

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Frederic,

Thank you for contacting our support forum.

Would you mind providing me with admin access to the website so that I can have a look ?

I suspect that there wasn't a content template build for french posts.

The private fields have been enabled for your next response.

Thanks,
Shane