WPML String Translation Symptoms Missing Code

View issue that happened because re installed it few times for test the translate of website.

The debug.log content has these errors:

WordPress database error Table 'wp_icl_strings' doesn't exist for query…
WordPress database error Table 'wp_icl_string_translations' doesn't exist for query…

These errors result in the following issues:

  • On the WPML->String Translation page there are no strings.
  • When scanning for theme and/or plugin strings on the WPML->Theme and plugins localization page there are no strings found.

These errors happen when the activation of WPML is not complete. We are not yet sure how this issue is exactly replicated.

You can use the following workaround and continue to work with WPML.

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

Leave a Comment

Your email address will not be published.