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 thread is resolved. Here is a description of the problem and solution.

Problem:
When I try to activate WPML my site crashes and I get error messages.

Solution:
I found that some of the WPML tables were missing from the database. To resolve this, I added the following script to your functions.php file and then still had to manually add two other tables.

function wpmlsupp_1891_fix_missing_icl_tables() {
    if( function_exists( 'icl_sitepress_activate' ) )
        icl_sitepress_activate();
}
add_action( 'wp_footer', 'wpmlsupp_1891_fix_missing_icl_tables' 

This topic contains 8 replies, has 3 voices.

Last updated by wilR-2 1 year, 9 months ago.

Assigned support staff: Lauren.

Author Posts
January 2, 2018 at 5:56 pm

Uwe Twelker

I am trying to: activate WPML Translation Management

Link to a page where the issue can be seen:

I expected to see: a success

Instead, I got: an error message:

Fatal error: Uncaught Exception: Could not add String with arguments: value: Cookies allow_empty_value:1 language: de in /var/www/vhosts/elke-bartholomaeus.de/httpdocs/wp-content/plugins/wpml-string-translation/classes/filters/class-wpml-register-string-filter.php:187 Stack trace: #0 /var/www/vhosts/elke-bartholomaeus.de/httpdocs/wp-content/plugins/wpml-string-translation/classes/filters/class-wpml-register-string-filter.php(134): WPML_Register_String_Filter->save_string('Cookies', true, 'de', 'admin_texts_ctc...', '', '[ctcc_content_s...') #1 /var/www/vhosts/elke-bartholomaeus.de/httpdocs/wp-content/plugins/wpml-string-translation/inc/functions.php(210): WPML_Register_String_Filter->register_string('', '[ctcc_content_s...', 'Cookies', true, 'de') #2 /var/www/vhosts/elke-bartholomaeus.de/httpdocs/wp-content/plugins/wpml-string-translation/inc/admin-texts/wpml-admin-text-import.class.php(86): icl_register_string('admin_texts_ctc...', '[ctcc_content_s...', 'Cookies', true) #3 /var/www/vhosts/elke-bartholomaeus.de/httpdocs/w in /var/www/vhosts/elke-bartholomaeus.de/httpdocs/wp-content/plugins/wpml-string-translation/classes/filters/class-wpml-register-string-filter.php on line 187

January 2, 2018 at 7:04 pm #1469813

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

I tried to access your site using the credentials provided but I am getting a 503 error. If you can let me know when that error is resolved, I'll be happy to login and take a look.

Otherwise, please go to WPML -> String Translation and search for a string with the value "cookie". If you find this, please delete the string. Now, when you try to activate WPML Translation Management, do you still see this error?

January 2, 2018 at 7:09 pm #1469816

Uwe Twelker

in Addition: I have deactivated all wpml plugins. With the last trial of activation I killed the website so that I had to restore it from the backup.

Best
Uwe

January 2, 2018 at 7:23 pm #1469826

Uwe Twelker

Hi Lauren

I crashed the website when trying to activate wpml. I had to restore it completely from the backup. Please try again.

Best

Uwe

January 2, 2018 at 8:34 pm #1469870

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Thanks for the update. I made a copy of your site using the Duplicator plugin so that I could install the WPML plugins without interrupting your live site. By activating the debug log, I found that some of the WPML tables were missing from the database. To resolve this, I added the following script to your functions.php file and then still had to manually add two other tables.

function wpmlsupp_1891_fix_missing_icl_tables() {
    if( function_exists( 'icl_sitepress_activate' ) )
        icl_sitepress_activate();
}
add_action( 'wp_footer', 'wpmlsupp_1891_fix_missing_icl_tables' );

If you would like me to do this on your live site, please confirm that you have a full backup and also double check the FTP access. The credentials provided are not allowing me to connect. I've marked the next reply as private so you can update login details as needed.

January 3, 2018 at 5:46 am
January 3, 2018 at 2:07 pm #1470709

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

Hi Uwe, thanks for updating credentials. I was able to login to your site and create the missing tables. Then I was able to activate WPML plugins without errors. I also had to go to WPML -> Support -> Troubleshooting to run the cleanup steps because I was seeing 404 pages, but now it looks like the site is loading correctly.

As to how it could have happened, something could have happened during the installation process that interrupted it, resulting in the tables not getting created.

Please let me know if you need any further assistance and I will be happy to help.

January 3, 2018 at 9:44 pm #1471116

Uwe Twelker

Hi Lauren

Unfortunately it didn't work out as it should. Please see screenshot. (When you are logged in, it is the start page)

Best

Uwe

January 3, 2018 at 11:03 pm #1471149

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-04:00)

The original issue in this ticket was that your site was crashing when WPML was activated. Can you please confirm that you are able to activate WPML without the site crashing?

As for the issue with the page builder content, may I kindly ask you please to open a new ticket for this question? This will also help other users with similar problems find solutions when searching the forum as well as we avoid mixing lots of questions in one ticket.

Thank you for your understanding.

September 9, 2019 at 1:44 pm #4537701

wilR-2

Hello, I am also getting errors when activating WPML Translation Management.

This code also gives me errors:

function wpmlsupp_1891_fix_missing_icl_tables() {
if( function_exists( 'icl_sitepress_activate' ) )
icl_sitepress_activate();
}
add_action( 'wp_footer', 'wpmlsupp_1891_fix_missing_icl_tables' );

Please help !! 🙂