If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 16 replies, has 6 voices.

Last updated by Bigul 1 month, 3 weeks ago.

Assigned support staff: Bigul.

Author Posts
September 11, 2019 at 10:21 am #4552533

Randall Mage

Just updated all WPML plugins to latest version. Now get errors all the time in WordPress.

Warning: Use of undefined constant WPML_TM_FOLDER - assumed 'WPML_TM_FOLDER' (this will throw an Error in a future version of PHP) in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php on line 7

Fatal error: Uncaught Error: Class 'WPML_Translation_Management' not found in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php:7 Stack trace: #0 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(83): WPML_Admin_URL::multilingual_setup(7) #1 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(29): WPML_Upgrade_Display_Mode_For_Posts->get_notice_content() #2 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(146): WPML_Upgrade_Display_Mode_For_Posts->run_admin() #3 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(134): WPML_Upgrade->maybe_run_admin(Object(WPML_Upgrade_Display_Mode_For_Posts)) # in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php on line 7

September 11, 2019 at 12:05 pm #4553281

maurice

I've the same Problem, but it came after I updated PHP from 5.6.x to 7.2.

September 12, 2019 at 9:30 am #4559765

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

Please try the following steps after a site backup and make sure the issue is existing or not.

1) Deactivate WPML plugins
2) Delete it from the plugins list
3) Download the latest version of WPML plugins from - https://wpml.org/account/downloads/
4) Upload the plugins
5) Activate it

--
Thanks!

Bigul

September 12, 2019 at 3:17 pm #4562313

Randall Mage

Error re-occurred on activating WPML Multilingual CMS. Same error:

Warning: Use of undefined constant WPML_TM_FOLDER - assumed 'WPML_TM_FOLDER' (this will throw an Error in a future version of PHP) in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php on line 7

Fatal error: Uncaught Error: Class 'WPML_Translation_Management' not found in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php:7 Stack trace: #0 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(83): WPML_Admin_URL::multilingual_setup(7) #1 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(29): WPML_Upgrade_Display_Mode_For_Posts->get_notice_content() #2 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(146): WPML_Upgrade_Display_Mode_For_Posts->run_admin() #3 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(134): WPML_Upgrade->maybe_run_admin(Object(WPML_Upgrade_Display_Mode_For_Posts)) # in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php on line 7

The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.

September 12, 2019 at 5:00 pm #4563601

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates. Please deactivate WPML Translation Management plugin for a moment and check the bug is existing or not.

Maybe you are facing this issue because of compatibility conflicts. So to make sure if possible, please do the following steps.

a) Backup your site first
b) Switch for a moment to a WordPress default theme like 2017
c) Deactivate all the plugins that are not related to WPML
d) If the issue is gone, activate the plugin one by one to see with which one there is an interaction issue

--
Thanks!

Bigul

September 13, 2019 at 11:28 am #4567939

Randall Mage

Theme switched to Twenty Nineteen.

All plugins deactivated except:
WPML Multilingual CMS
WPML String Translation
WPML Translation Management

Issue still occurs:

Warning: Use of undefined constant WPML_TM_FOLDER - assumed 'WPML_TM_FOLDER' (this will throw an Error in a future version of PHP) in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php on line 7

Fatal error: Uncaught Error: Class 'WPML_Translation_Management' not found in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php:7 Stack trace: #0 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(83): WPML_Admin_URL::multilingual_setup(7) #1 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(29): WPML_Upgrade_Display_Mode_For_Posts->get_notice_content() #2 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(146): WPML_Upgrade_Display_Mode_For_Posts->run_admin() #3 /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(134): WPML_Upgrade->maybe_run_admin(Object(WPML_Upgrade_Display_Mode_For_Posts)) # in /home/localga/test.localsoftgames.com/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php on line 7

The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.

September 13, 2019 at 3:54 pm #4569923

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the details. Please deactivate WPML Translation Management plugin for a moment and check the bug is existing or not.

I would like to access the admin area of your site for further checking. Please fill the private details fields after a full site backup.

Please check the following links for more details about our private information sharing policies.

https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

hidden link

--
Thanks!

Bigul

September 13, 2019 at 6:21 pm #4570371

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the login information. This error is happening randomly while *WPML Translation Management* is active, am I right? Because I am not able to reproduce it exactly on your site when *WPML Translation Management* plugin is deactivated. Please let me know your feedback on this.

Also, please allow me to make a duplicator copy of your site using the Duplicator plugin(https://wordpress.org/plugins/duplicator/) for debugging the issue on my local server.

--
Thanks!

Bigul

September 13, 2019 at 9:46 pm #4570891

Randall Mage

Yes the error occurs while using WordPress backend when WPML Translation Management is active. This only occurred when the latest WPML updates were applied. The previous versions were working fine with no errors. The rro only appears sometimes. Normally when logging in, viewing plugins page, viewing settings page but not always. If I flick between /wp-admin and then plugins and then settings it will occur.

Yes please use duplicator to test on local environment.

September 14, 2019 at 1:49 am #4571063
oniR

Hello, I've update my plugins yesterday morning and have the exact same issue

Very blocking to create new woocommerce orders, it keeps crashing.

An error of type E_ERROR was caused in line 7 of the file /home/zengarde/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php. Error message: Uncaught Error: Class 'WPML_Translation_Management' not found in /home/zengarde/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/utilities/admin/class-wpml-admin-url.php:7
Stack trace:
#0 /home/zengarde/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(83): WPML_Admin_URL::multilingual_setup(7)
#1 /home/zengarde/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/commands/class-wpml-upgrade-display-mode-for-posts.php(29): WPML_Upgrade_Display_Mode_For_Posts->get_notice_content()
#2 /home/zengarde/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(146): WPML_Upgrade_Display_Mode_For_Posts->run_admin()
#3 /home/zengarde/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/upgrade/class-wpml-upgrade.php(134): WPML_Upgrade->maybe_run_admin(Object(WPML_Upgrade_Display_Mode_For_Posts))
#4 /home/zengarde/public_html/wp-content/plugins/sitepre

New threads created by Bigul and linked to this one are listed below:

https://wpml.org/forums/topic/an-error-of-type-e_error-was-caused-in-line-7-of-the-file/

September 14, 2019 at 3:56 pm #4572945

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Thank you for the updates and permission. The bug is existing on my local server with your Duplicator copy. Will check the issue with our second-tier team for the expert opinion and get back to you soon. Please wait.

--
Thanks!

Bigul

September 17, 2019 at 9:12 am #4586903

Randall Mage

OK, thanks will wait to hear back.

September 19, 2019 at 6:23 am #4601643

susanneG-2

Hi,

Is there already a solution for this problem?

September 19, 2019 at 1:40 pm #4605447

Bigul
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

We have an easy workaround for the bug now and the error is expected to fix in WPML 4.2.9. Actually, we have to modify the database value directly to fix the issue. This may make issues in the settings. So please try the following steps after <strrong>a full site backup</strrong> and make sure the issue is existing or not.

1) Add the following code in functions.php of your theme

add_action('wp', function (){
   $wpml_settings = get_option('icl_sitepress_settings');
   
   if (!empty($wpml_settings['show_untranslated_blog_posts'])) {
       unset($wpml_settings['show_untranslated_blog_posts']);
       update_option('icl_sitepress_settings', $wpml_settings);
   }
});

2) Visit the frontend of the site

3) Remove the newly added code from the functions.php file

--
Thanks!

Bigul

September 20, 2019 at 2:11 pm #4612939
susanneG-2

That did not resolve the issue for me Bigul.

New threads created by Bigul and linked to this one are listed below:

https://wpml.org/forums/topic/uncaught-error-class-wpml_translation_management-not-found/