Skip to content Skip to sidebar

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.

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

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 5 replies, has 2 voices.

Last updated by Mateus Getulio 1 year, 9 months ago.

Assisted by: Mateus Getulio.

Author Posts
October 27, 2023 at 9:41 am #14676977

danielH-88

I have a user with the role "editor" who I assigned as a translation manager. I am aware that it is intended behavior, that the user cannot translate posts of other users by default. So I have added the hook as described here: https://wpml.org/forums/topic/editor-role-can-not-translate/

The hook, however, does not show up in the documentation nor does it work. The user still is unable to edit translations. Immediately returning true with this hook also doesn't seem to work, making me wonder if the hook even exists? Or has it been removed by now? If so, how can I resolve the issue with editors unable to edit posts of other users?

October 27, 2023 at 9:00 pm #14682223

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Welcome to the WPML support forum!

Let's try a possible solution by resetting the user roles capabilities. Please follow these steps:

- Make sure to have a website backup
- Get access to your files and edit the your-theme-directory/functions.php file
- Add this line of code:

if ( !function_exists( 'populate_roles' ) ) {
  require_once( ABSPATH . 'wp-admin/includes/schema.php' );
}

populate_roles();

This WordPress function should directly rebuild the roles and their capabilities. Please give it a try and check again if the Editor is able to open the translations now.

Thanks,
Mateus.

October 30, 2023 at 1:48 pm #14692535

danielH-88

Hi there,

Thank you for your reply!
Unfortunately I cannot reset roles/capabilities since we do customize some of the roles. Here's the relevant (enabled) capabilities of the "editor" role:

- manage_translations
- wpml_manage_translation_management
- wpml_manage_languages
- wpml_manage_translation_options

Are those all that are needed, or is one missing?

Thanks!

October 30, 2023 at 8:15 pm #14694967

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thanks for your reply.

You can check more info about the WPML capabilities here: https://wpml.org/documentation/support/wpml-admin-capabilities/

The fact that you are using a custom solution to create user roles and permissions may be related to why the snippet does not work.

May I kindly ask you to try to replicate the issue in this clean Sandbox? hidden link. Please let us know the exact step-by-step you're following as well.

Looking forward to your reply. Thanks!

October 31, 2023 at 1:31 pm #14700153

danielH-88

Hi!

We noticed that this issue affects all websites we developed for our clients. A lot of them do not utilize any custom roles/capabilities.

As requested, I have set up the sandbox you provided with the same setup we have for our websites. The issue exists on the sandbox as well.
There's a new user called "employee" with the role "editor", which is also configured as a translation manager. Username "employee", Password "employee".

Thank you for looking into this!

October 31, 2023 at 7:16 pm #14703409

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thank you for replicating the issue in the Sandbox.

The problem here is that just add the Editor as a translation manager won't be enough. You also have to add the user as a translator in the same screen "WPML -> Translation Management -> Dashboard", with the correct language-pairs. More info: https://wpml.org/documentation/translating-your-contents/how-to-set-up-local-translators-and-language-pairs/

I have just done this to the mentioned Editor user, and now it is working fine. Could you please double-check it?

Thank you,
Mateus.

The topic ‘[Closed] Translation manager with editor role unable to translate other posts’ is closed to new replies.