From administrator/components/com_languages_src/Helper/MultilangstatusHelper.php::getContacts()
This is the query that looks for problems:
And this is the code that decides if there are problems:
You can use your own table prefix to see what the query returns in phpMyAdmin.
It may help you figure out what needs to be done.
This is the query that looks for problems:
Code:
SELECT `u`.`name`,(SELECT COUNT(*)FROM `#__contact_details` AS `cd`WHERE `cd`.`user_id` = `u`.`id` AND `cd`.`published` = 1 AND `cd`.`language` = '*') AS `alang`,(SELECT COUNT(DISTINCT `l`.`lang_code`)FROM `#__languages` AS `l`LEFT JOIN `#__contact_details` AS `cd` ON `cd`.`language` = `l`.`lang_code`WHERE `cd`.`user_id` = `u`.`id` AND `cd`.`published` = 1 AND `l`.`published` = 1) AS `slang`,(SELECT COUNT(*)FROM `#__languages` AS `l`LEFT JOIN `#__contact_details` AS `cd` ON `cd`.`language` = `l`.`lang_code`WHERE `cd`.`user_id` = `u`.`id` AND `cd`.`published` = 1 AND `l`.`published` = 1GROUP BY `l`.`lang_code`HAVING COUNT(*) > 1) AS `mlang`FROM `#__users` AS `u`LEFT JOIN `#__contact_details` AS `cd` ON `cd`.`user_id` = `u`.`id`WHERE EXISTS (SELECT 1FROM `#__content` AS `c`WHERE `c`.`created_by` = `u`.`id`)GROUP BY `u`.`id`,`u`.`name`
Code:
$db->setQuery($query); $warnings = $db->loadObjectList(); foreach ($warnings as $index => $warn) { if ($warn->alang == 1 && $warn->slang == 0) { unset($warnings[$index]); } if ($warn->alang == 0 && $warn->slang == 0 && empty($warn->mlang)) { unset($warnings[$index]); } if ($warn->alang == 0 && $warn->slang == $languages && empty($warn->mlang)) { unset($warnings[$index]); } } return $warnings;
It may help you figure out what needs to be done.
Statistics: Posted by ceford — Wed Jun 12, 2024 7:57 am