Skip Navigation

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 15 replies, has 2 voices.

Last updated by Bigul 3 years, 11 months ago.

Assisted by: Bigul.

Author Posts
July 6, 2021 at 6:40 am #9135095

abdulw-3

Im facing this issue in wp even after creating custom tables in DB. Please I need the sol asap.

WordPress database error: [Table 'wordpress.wp_icl_languages' doesn't exist]
SELECT l.code, l.id, english_name, nt.name AS native_name, major, active, default_locale, encode_url, tag, lt.name AS display_name FROM wp_icl_languages l JOIN wp_icl_languages_translations nt ON ( nt.language_code = l.code AND nt.display_language_code = l.code ) LEFT OUTER JOIN wp_icl_languages_translations lt ON l.code=lt.language_code WHERE ( lt.display_language_code = 'en' OR (lt.display_language_code = 'en' AND NOT EXISTS ( SELECT * FROM wp_icl_languages_translations ls WHERE ls.language_code = l.code AND ls.display_language_code = 'en' ) ) ) GROUP BY l.code ORDER BY english_name ASC

July 6, 2021 at 6:42 am #9135103

abdulw-3

Issue in writing tables in DB by itself.

July 6, 2021 at 7:15 am #9135327

abdulw-3

Here is the error.

image.png
July 6, 2021 at 9:12 am #9136273

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

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

Please try the workaround suggested in the following table after a full site backup and make sure you are getting the expected results or not.

https://wpml.org/errata/missing-_icl_strings-_icl_string_translations-data-tables/

Have you had this error after making any major changes in the site, like upgrading from an older version of WordPress or plugins.

--
Thanks!

Bigul

July 6, 2021 at 10:59 am #9137555

abdulw-3

Hi Bigul
I tried to ad this code into website functions.php file and then removed it after visiting homepage but still there is error in wp-admin.

There has been a critical error on this website. Please check your site admin email inbox for instructions.

Learn more about troubleshooting WordPress.

July 6, 2021 at 11:07 am #9137623

abdulw-3

When i try to activate the plugin it does the same issue again and again. And when i deactivate it, site works fine.
Please help me in this

July 6, 2021 at 1:17 pm #9139441

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. Please share with me the WordPress debug.log(not WPML debug information) for more details on this. Refer to this page for instructions https://wpml.org/documentation/support/debugging-wpml/

To enable WordPress Debug log, open your wp-config.php file of site root and look for define('WP_DEBUG', false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please do the steps to reproduce the bug and check you are getting any errors or warnings related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).
--
Thanks!

Bigul

July 6, 2021 at 5:01 pm #9141529

abdulw-3

i did as you said, changes in wp-config.php file but all in vain. Nothing happens.
Can u tell me the proper way to resolve it please? dig it more

Capture.PNG
July 7, 2021 at 7:02 am #9144621

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. Please fill the private details fields(including the FTP credentails) after a full site backup. I would like to access the admin area of your site for further checking.

Please refer to 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

Please allows 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

July 7, 2021 at 12:58 pm #9148471

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. But the test site is asking for authentication. So please share it. Refer to the attached image for more details.

--
Thanks!

Bigul

2021-07-07_18-17-06.png
July 7, 2021 at 2:17 pm #9149457

abdulw-3

Hi Bigul, just wanna confirm with you have you got the site access and find the issue ?

July 7, 2021 at 2:36 pm #9149617

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. I can access the site now and made a copy of the site, will debug the issue locally and get back to you as soon as possible. Please wait.

--
Thanks!

Bigul

July 7, 2021 at 2:37 pm #9149621

abdulw-3

Great.
Sure update me asap when its done, as its a high priority thing for my organization.
Thank you so much for your time.

July 7, 2021 at 3:18 pm #9149799

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. On the local copy, I am getting the following error in Debug.log after activating WPML.

WordPress database error Unknown column 'nt.name' in 'field list' for query 
            SELECT
              l.code,
              l.id,
              english_name,
              nt.name AS native_name,
              major,
              active,
              default_locale,
              encode_url,
              tag,
              lt.name AS display_name
			FROM **_icl_languages l
			JOIN **_icl_languages_translations nt
			  ON ( nt.language_code = l.code AND nt.display_language_code = l.code )
            LEFT OUTER JOIN **_icl_languages_translations lt ON l.code=lt.language_code
			WHERE 
			  ( lt.display_language_code = 'en'
			  OR (lt.display_language_code = 'en'
			    AND NOT EXISTS ( SELECT *
			          FROM **_icl_languages_translations ls
			          WHERE ls.language_code = l.code
			            AND ls.display_language_code = 'en' ) ) )
            GROUP BY l.code
ORDER BY english_name ASC made by do_action('admin_init'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Admin\Admin_Columns_Cache_Integration->fill_cache, WP_Query->get_posts, wp_queue_posts_for_term_meta_lazyload, get_object_term_cache, get_term, apply_filters('get_term'), WP_Hook->apply_filters, SitePress->get_term_adjust_id, WPML_Term_Adjust_Id->filter, SitePress->get_current_language, SitePress->set_this_lang, SitePress->is_valid_language, SitePress->get_languages, WPML_Installation->refresh_active_lang_cache

And it works as expected after running the following query. So please login to your database via PHPMyAdmin after a full site backup{mandatory} and run the following query. Then make sure the issue is existing or not.

DROP TABLE IF EXISTS `wp_icl_languages_translations`;
CREATE TABLE IF NOT EXISTS `wp_icl_languages_translations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `language_code` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_language_code` varchar(7) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `language_code` (`language_code`,`display_language_code`)
)ENGINE=InnoDB AUTO_INCREMENT=4226 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
Thanks!

Bigul

July 7, 2021 at 4:05 pm #9150291
abdulw-3

Hi Bigul
I've done the same thing as you and run the query in DB, tables error is resolved but there is new issue in it.
/var/www/html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/class-wp-installer.php on line 894

Please can you check this?

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

https://wpml.org/forums/topic/uncaught-error-call-to-undefined-function-simplexml_load_file/

Capture.PNG