Imported languages are bugged
-
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.phpline 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 withempty()etc.
wp-content/plugins/polylang/include/model.phpline 155if ((defined('PLL_CACHE_LANGUAGES') && !PLL_CACHE_LANGUAGES) || false === ($languages = get_transient('pll_languages_list'))) {$languageswhich has no items does not equalfalseand won’t be repopulated by this function.
The topic ‘Imported languages are bugged’ is closed to new replies.