[Resolved] Error adding a new language (Europe - English)
This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're trying to add a new custom language in WPML and encounter the error message "Error adding a new language", and your debug log shows a database error related to an unknown 'country' column during an INSERT operation into the `wp_icl_languages` table, this summary is for you.
Solution:
First, ensure that all your plugins are up to date. If the issue persists, follow these steps:
1. Enable the WordPress debug log by setting
define('WP_DEBUG', true);
and
define('WP_DEBUG_LOG', true);
in your wp-config.php file, then reproduce the issue.
2. Check the debug.log file for errors.
3. If you see an error showing that the 'country' column is missing in the `wp_icl_languages` table in your database, run the following SQL query:
Please ensure you have a full backup of your website before making any changes to the database. If this solution does not seem relevant to your issue, please open a new support ticket with us.
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.
Thank you for contacting WPML Support, I will be happy to help you.
1) Could you please tell me what is the code that you are using for the language you want to add, as I am not able to check it properly from the screenshot?
2) Can you please check the following steps:
- Update all plugins (if there is any outdated)
- Deactivate all plugins except WPML and its addons and check for the issue.
- After, activate each plugin one-by-one, while keeping check on the issue after a plugin is activated. This way you'll be able to pinpoint a plugin having a conflict (or problem), if any.
- If the problem persists, please repeat the above steps with a default theme of WordPress
To enable debug.log, open your wp-config.php file and look for:
define('WP_DEBUG', false);
And change it to:
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 which is recommended on a live site.
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors',0);
Then try to reproduce the issue and check if any errors were saved to the debug.log log file inside the “.../wp-content/” directory
If you can paste your debug.log to https://pastebin.com/ and provide me with that link, it would be great!
Thank you for the updates. Please login to the database using a tool like PHPMyAdmin or Adminer. After that check *country* column exists in *wp_icl_languages* table.
If the *country* column is missing in the *wp_icl_languages* table please run the following query:
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.