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
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

Tagged: 

This topic contains 14 replies, has 2 voices.

Last updated by Dražen 1 year, 10 months ago.

Assisted by: Dražen.

Author Posts
December 12, 2023 at 10:59 am #15044613

gabeK

Hello. I'm trying to translate a post and when clicking the pencil icon from within the editor, I'm redirected to the Translation Queue page and I'm unable to translate the post. In the Advanced Translation Editor Error Logs I see the message "WPML has detected a change in your site's URL. To continue translating your site, go to your...". Could you please help me?

December 13, 2023 at 2:01 pm #15055513

gabeK

Hello.

Has any WPML supporter got the time to check the issue I'm facing here? Thank you.

December 15, 2023 at 9:27 am #15070673

Dražen
Supporter

Languages: English (English )

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

Hello,

Please make a full backup of your site (files and database) and confirm it in your next reply.
If possible please provide access to the staging website, not production.

Please note, that I might need to do some debugging procedures like enable/disable plugins, switch themes, change the default language of the user account, and/or access your website database to debug the issue furtherly.

I will share with you any changes or steps done in this process. Please let me know if you do not agree with the above or if I do not have your permission for any.

I would need to access both your site's wp-admin and FTP account, if possible.

I have enabled the private username and password fields in your next reply.

I suggest you create a new user, set it as an administrator and then add those credentials in the private fields mentioned.

You can safely add your information into these fields.

Thanks,
Drazen

December 20, 2023 at 8:57 am #15099035

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks.

I have tried to switch the theme and disable plugins. I need to further test in minimal enviroment., but I got a critical error.

Since I do not have FTP I can not check this error and continue.

Please switch to WP default theme and leave only wpml plugins enabled.
Update wpml plugins to the latest versions. Check if the issue still happens.

If yes, please let me know and I will check further.

Thanks,
Drazen

December 21, 2023 at 11:35 am #15109455

gabeK

Hello Drazen. I've disabled all the plugins except for the WPML ones. I've also switched to the default theme. As far as I can see the issue persists.

I cannot leave the staging site like that for too long, could you please proceed with next steps ASAP?

Thank you

December 21, 2023 at 12:41 pm #15110299

Dražen
Supporter

Languages: English (English )

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

Hello,

I checked and I see there are still some plugins active and some backend options hidden, so I suspect something is more involved here.

I also see you have some custom roles which might be the reason for this.

It seems your role can not edit translations that was before assigned to another translator, but it works fine for ones that where never assigned. The first issue, you can solve by going to WPML > Translation Managment choosing pages and sending for translation and assigning it to your user role.

- https://wpml.org/documentation/translating-your-contents/

If that is not a satisfactory solution for you, then we would need a staging site without any limitations and additional plugin codes and etc, and we can try to check and reset capabilities for the current user / role.

If you wish you can also check it yourself: https://wpml.org/documentation/support/wpml-admin-capabilities/

Regards,
Drazen

December 21, 2023 at 1:27 pm #15110731

gabeK

Hello Drazen.

I've deactivated the other custom plugin and now the site only runs WPML plugins.

The role of my account is Administrator. It's a custom role. Isn't the administrator able to perform translations?

I'm not happy with the solution you are suggesting, could you please help me further?

December 21, 2023 at 1:28 pm #15110733

gabeK

To add to what I wrote above, there was no change in the permissions of roles between the time it was working and the time it stopped.

December 21, 2023 at 1:39 pm #15110795

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks.

Something has changed the capabilities of the role, either by code, some plugin or etc.

For example, I do not have access to the Theme file editor, or plugins > Add new, so this role doesn't have default role capabilities by WordPress.

This also has not added all the needed WPML capabilities for this role and causing issue you have reported. You can try adding all from the URL I shared in my last reply.

Otherwise, I would need to test and further check this, but you need either to reset this role capabilities so I have default WP admin access or provide FTP access.

Regards,
Drazen

Screenshot_1.jpg
December 21, 2023 at 1:50 pm #15110965

gabeK

Access to the theme and plugin editor has been disabled in the wp-config.php file long before translations stopped working. This hasn't affected the permission of the role. Are you seeing that the Administrator role doesn't have the permission required to perform translations? Also, FTP access cannot be provided.

In the link you shared I see that WPML defines the capabilities and adds them to admins, but you will need an access management plugin to assign them to non-admin users.

My account is an admin account, why I cannot perform translations? It must be something else not role-related.

What would you do if you had FTP access? Maybe I can do that instead of you.

Could you please help me?

December 21, 2023 at 2:13 pm #15111089

Dražen
Supporter

Languages: English (English )

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

Hello,

I am pretty sure that is what is causing the issue since we have had similar if not the same issues in the past.

1) Can you try to create now new user without the extra plugin that is adding custom roles?

2) I would need FTP to try some solutions, but you can try them also if not possible to provide FTP:

a - https://wpml.org/errata/wpml-custom-role-based-on-the-editor-role-cannot-edit-translations-and-behave-as-editor/

b- Add the below code the functions.php

add_filter('wpml_user_can_translate', function ($user_can_translate, $user){
	if (in_array('editor', (array) $user->roles, true) && current_user_can('translate')) {
		return true;
	}
	
	return $user_can_translate;
}, 10, 2);

Visit frontend, and try again

c- Add the below code the functions.php

function wpmlsupp_1706_reset_wpml_capabilities() {
    if ( function_exists( 'icl_enable_capabilities' ) ) {
        icl_enable_capabilities();
    }
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );

Visit frontend, and try again

Please try and let me know how it goes.

Regadrs,
Drazen

December 21, 2023 at 9:05 pm #15113389

gabeK

Hello Drazen,

I appreciate your help. However, I'm struggling to understand why you insist on bringing up fixes for custom roles. As I've mentioned, my user has the Administrator role and so does yours. Are you able to translate posts, I'm not. Anyway, I applied all the fixes that you suggested without any luck. I've reverted the changes of course.

Is there anything else you could suggest that I could try?

Thank you

December 22, 2023 at 7:43 am #15114569

Dražen
Supporter

Languages: English (English )

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

Hello,

I am insisting since I am pretty sure something is wrong with this role or its capabilities have been somehow corrupted, so this is why this issue happens.

We have had similar if not the same cases before, and most of the time issues are with custom roles and 3rd plugins used for adjusting roles and capabilities.

Anyway, is it okay if I take a copy of your website and check it out further?

Thanks,
Drazen

December 22, 2023 at 8:46 am #15114851

gabeK

Hello,

No actually I cannot let you make a copy of the website, unfortunately. Isn't there anything else you could check on that actual site?

Thank you

December 22, 2023 at 12:53 pm #15117395

Dražen
Supporter

Languages: English (English )

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

Hello

I am afraid I cannot do much more or check in these circumstances.

I need to take a copy to check further and then escalate to 2nd tier.

Regards,
Drazen

The topic ‘[Closed] when clicking the pencil icon from within the editor, I'm redirected to the Translation Queue page’ is closed to new replies.