Skip Navigation

Resolved

Reported for: WPML Multilingual CMS 4.6.7

Resolved in: WPML 4.6.9

Topic Tags: Bug

Overview of the issue

If you’re using WPML on your website, it’s crucial to have a default language set. In cases where the default language is removed without setting a new one, you may find the following error:

PHP Fatal error: Uncaught InvalidArgumentException: Argument $language_code must be a non empty string. in .../wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:80

Workaround

  • Go to WPML > Languages > Site Languages page.
  • Add a new default language.