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 3 risposte, has 2 voci.

Last updated by Riffaz 4 settimane, 1 giorno fa.

Assigned support staff: Riffaz.

Autore Post
September 20, 2019 at 9:57 am #4611175

ettore barabino

Buon giorno,
stavo aggiornando alle ultime versioni pubblicate di WPML Multilingual CMS, String Translation e Translation Management, alla fine dell'aggiornamento è comparso questo avviso

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/barabino/ on line 7

Fatal error: Uncaught Error: Class 'WPML_Translation_Management' not found in /home/barabino/ Stack trace: #0 /home/barabino/ WPML_Admin_URL::multilingual_setup(7) #1 /home/barabino/ WPML_Upgrade_Display_Mode_For_Posts->get_notice_content() #2 /home/barabino/ WPML_Upgrade_Display_Mode_For_Posts->run_admin() #3 /home/barabino/ WPML_Upgrade->maybe_run_admin(Object(WPML_Upgrade_Display_Mode_For_Posts)) #4 /home/barabino/ in /home/barabino/ on line 7

sto migrando il sito quindi per poterlo vedere dovete modificare il file host con questi dati hidden link


September 22, 2019 at 11:42 am #4618309


Languages: Inglese (English )

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


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 a full site backup 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'])) {
       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


September 24, 2019 at 8:01 am #4628795

ettore barabino

Thank you Riffaz,now it works, but when the new relase comes out, I have to delete what I added?

September 24, 2019 at 8:09 am #4628959


Languages: Inglese (English )

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


You are welcome.

You can delete that now.
You need this only once till you visit your frontend.
You did that already.
So you can remove it now.
So obviously you do not have to worry about upcoming releases. 🙂