• I will just list bugs that I have found:
    – Fresh install of polylang, Languages are empty (didn’t define any). Now I import posts by using wordpress importer which also adds missing languages. When I visit languages page the list is empty. When I want to add those languages manually there is an error “Impossible to add the language.”. When I add some other languages the list contains all the missing languages and those added. In other words they exist byt are not visible
    – After some research I found that it happens because in your code you are comparing arrays unproperly. For example:
    wp-content/plugins/polylang/admin/settings.php line 100:

    // only if at least one language has been created
    		if ($listlanguages = $this->model->get_languages_list()) {

    returns true even when array has 0 elements array(). Arrays should be compared with empty() etc.
    wp-content/plugins/polylang/include/model.php line 155

    if ((defined('PLL_CACHE_LANGUAGES') && !PLL_CACHE_LANGUAGES) || false === ($languages = get_transient('pll_languages_list'))) {

    $languages which has no items does not equal false and won’t be repopulated by this function.

    https://ww.wp.xz.cn/plugins/polylang/

The topic ‘Imported languages are bugged’ is closed to new replies.