Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing an issue where pages that take data from MetaBox display the correct translation in Greek, but when switching to the English version, the Greek translation persists. This problem only occurs for logged-out users; logged-in admins see the correct translations in both languages.

Solution:
We have identified this as a known issue and have published an errata at https://wpml.org/errata/oxygen-templates-translation-issues-for-logged-out-visitors/.

If this solution does not seem relevant to your situation, please do not hesitate to open a new support ticket at our support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 19 replies, has 2 voices.

Last updated by Waqas Bin Hasan 1 year ago.

Assisted by: Waqas Bin Hasan.

Author Posts
January 22, 2024 at 7:23 am #15209567

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I migrated the site to hidden link and tested some workaround without any luck. So I've escalated the matter again to our 2nd tier team for further investigation.

I'll update you as soon as there's a progress.

January 22, 2024 at 2:27 pm #15212054

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for waiting on this.

Team applied following code using WP Code plugin to run "everywhere":

add_action( 'init', 'wpml_ct_add_templates_cpt' );

function wpml_ct_add_templates_cpt() {

	$labels = array(
		'name'               => _x( 'Templates', 'post type general name', 'component-theme' ),
		'singular_name'      => _x( 'Template', 'post type singular name', 'component-theme' ),
		'menu_name'          => _x( 'Templates', 'admin menu', 'component-theme' ),
		'name_admin_bar'     => _x( 'Template', 'add new on admin bar', 'component-theme' ),
		'add_new'            => _x( 'Add New Template', 'template', 'component-theme' ),
		'add_new_item'       => __( 'Add New Template', 'component-theme' ),
		'new_item'           => __( 'New Template', 'component-theme' ),
		'edit_item'          => __( 'Edit Template', 'component-theme' ),
		'view_item'          => __( 'View Template', 'component-theme' ),
		'all_items'          => __( 'Templates', 'component-theme' ),
		'search_items'       => __( 'Search Templates', 'component-theme' ),
		'parent_item_colon'  => __( 'Parent Templates:', 'component-theme' ),
		'not_found'          => __( 'No templates found.', 'component-theme' ),
		'not_found_in_trash' => __( 'No templates found in Trash.', 'component-theme' )
	);

	$args = array(
		'exclude_from_search' => true,
		'labels'             => $labels,
		'public'             => true,
		'publicly_queryable' => true,
		'has_archive'		 => true,
		'show_ui'            => true,
		'show_in_menu'       => 'ct_template',
		'rewrite' 			 => false,
		'query_var'          => true,
		'capability_type'    => 'post',
		'hierarchical'       => false,
		'menu_position'      => null,
		'supports'           => array( 'title' )
	);

	register_post_type( 'ct_template', $args );

}

which only registers the CPT (without the extra logic to flush permalinks and stuff). You can find this code in your staging site -> Code Snippets.

Since Oxygen disables current theme logic, this is the only way to execute some code or we could add this to theme's functions.php file (or write a new plugin).

After that they did some manual translation by editing the template in English (used on hidden link) and you can see it displays that translated (see attached).

Also perhaps it is not a good idea to translate the content with native editor (oxygen builder).

They further advise to contact Oxygen support for proper compatibility. Since this plugin isn't compatible with WPML (https://wpml.org/plugin/oxygen/), you can provide these details to them.

Theme and plugin authors are welcome to join WPML’s Go Global program, which helps them make their code multilingual ready. Together with WPML’s compatibility team, they can test and confirm that their theme or plugin works with WPML. See https://wpml.org/documentation/support/go-global-program/ for details and you can refer your theme/plugin provider to this as well.

image3.png
January 23, 2024 at 5:26 am #15214088

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Just wanted to update you that we've published an errata also at https://wpml.org/errata/oxygen-templates-translation-issues-for-logged-out-visitors/. You can keep it bookmarked and subscribe to the comments for any future progress.

January 23, 2024 at 7:48 am #15214366

hamletT

Thank you very much for the support!!

January 23, 2024 at 10:00 am #15215425

Waqas Bin Hasan
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your understanding, patience and cooperation.

Our team has also contacted the author, but please note this may take some time, keep an eye on the errata (when possible).

In the meanwhile, please feel free to mark this ticket as resolved, if you think the provided workaround solves the current problem.