Skip Navigation

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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Alejandro 7 months, 3 weeks ago.

Author Posts
September 7, 2023 at 9:15 am #14357515

muhammadO-2

i have set the translator and allowed him some regions access only but when that translator is making duplicate posts in the wpml translate content box it shows all the regions even those whose access were not given to the translator and the translator is able to duplicate the content in those regions too but not able to edit them, is there any plugin settings for duplicating posts and it should only allow those regions duplication of which the translator have the access of.

September 8, 2023 at 2:56 pm #14367575

Alejandro
Supporter

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

Timezone: Europe/Rome (GMT+02:00)

Hello!

I suppose that by "regions" you mean your language enabled, right?

If that's the case, this is a relatively newly known issue and we have a workaround that might work for you.

Search the following file: wp-content/plugins/sitepress-multilingual-cms/menu/post-menus/post-edit-screen/wpml-meta-boxes-post-edit-html.class.php

find this line of code:

				    echo PHP_EOL . '<!-- $translation_status = ' . $translation_status . ' -->' . PHP_EOL;

				    if ( $translation_status && $translation_status < ICL_TM_COMPLETE ) {

replace it with:

				    echo PHP_EOL . '<!-- $translation_status = ' . $translation_status . ' -->' . PHP_EOL;
				    $lang_from = trim(implode(array_keys($translations)));
				    $lang_to = $lang["code"];
				    $userlanguages = get_user_meta(get_current_user_id(),$this->sitepress->wpdb()->prefix . 'language_pairs',true );
				    foreach ($userlanguages as $from => $to ) {
					    $set_to_disable = true;
					    if ($lang_from == $from){
						    if ($lang_to == trim(implode(array_keys($to)))){
                                $set_to_disable = false;
						    }
					    }
				    }
				    if ( $translation_status && $translation_status < ICL_TM_COMPLETE || $set_to_disable ) {

Let us know if that solves the problem for now

Regards.

The topic ‘[Closed] wpml duplicate post translator regions access’ is closed to new replies.