Resolved
Reported for: WPML Translation Management 2.10.7
Resolved in: 2.10.8
Overview of the issue
When using Enfold theme, Elementor, or Oxygen Builder, the Translation Tools tab in WPML → Translation Management is empty.
You may also see a Uncaught SyntaxError: Unexpected token ‘<‘ error.
Workaround
Our developers have already identified the issue and we are working on it. In the meantime, you can use the following workaround. Please, make a full backup of your site, files and database, before proceeding:
- Open the /wpml-translation-management/classes/ATE/proxies/Widget.php file.
- Look for line 25-26:
return $template; }
- Replace it with:
return $template; }, PHP_INT_MAX
Looks like the code is wrong?
Fatal error: Uncaught Error: Class ‘WPML\ATE\Proxies\WPML_Manage_Translations_Role’ not found in /home/customer/www/richeskarayib.com/public_html/wp-content/plugins/wpml-translation-management/classes/ATE/proxies/Widget.php:13 Stack trace: #0
Caused by
if ( current_user_can( WPML_Manage_Translations_Role::CAPABILITY ) || current_user_can( ‘manage_options’ ) ) {
is missing a \
It should be
if ( current_user_can( \WPML_Manage_Translations_Role::CAPABILITY ) || current_user_can( ‘manage_options’ ) ) {
Add \ and it works ok.
Thank you very much Robert. It seems WP was stripping that \, sorry about that. I’ve update the code in order to make it simple.
Thanks again for your feedback!
In my case it still doesn’t work after changing the file
Hey there,
If the workaround does not help in your case, please open a ticket in our support forum as we would need to investigate further.
Thank you for your help.