No Code Attached Yet bug
avatar Kostelano
Kostelano
23 May 2023

Steps to reproduce the issue

On the main control panel, edit the Quick Icons module by selecting the Show Items with Count value for the Languages Icon.

Screenshot_1

Having 2 languages ​​on the site (together with English), we see one less on the main page. If we remove "our" language, the main page will still show one. If we set 2 or more languages, the main page will again show one.

Screenshot_2

avatar Kostelano Kostelano - open - 23 May 2023
avatar joomla-cms-bot joomla-cms-bot - change - 23 May 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 May 2023
avatar Kostelano
Kostelano - comment - 23 May 2023

The model displays "published" languages. But we will always have the default language 1..?

By analogy with other icons - there we also display only published elements.

Then it makes no sense for the language parameter to display a quantity, it should just be a link to the installed languages (similar to media, styles / templates, smart search, etc). Or the number of installed languages, which will be different from the logic of other icons.

public function getQuickiconContent()
{
$model = $this->getModel('languages');
$model->setState('filter.published', 1);
$amount = (int) $model->getTotal();
$result = [];
$result['amount'] = $amount;
$result['sronly'] = Text::plural('COM_LANGUAGES_N_QUICKICON_SRONLY', $amount);
$result['name'] = Text::plural('COM_LANGUAGES_N_QUICKICON', $amount);
echo new JsonResponse($result);
}
}

avatar brianteeman
brianteeman - comment - 24 May 2023

The count is not a count of languages installed on the site
The count is a count of the content languages on the site

avatar richard67
richard67 - comment - 24 May 2023

The count is a count of the content languages on the site

To be more precise: Published content languages.

@Kostelano Please check and report back if the number is shown correctly when you have more than 1 content language published. Thanks in advance.

avatar richard67 richard67 - change - 24 May 2023
Labels Added: Information Required
avatar richard67 richard67 - labeled - 24 May 2023
avatar brianteeman
brianteeman - comment - 24 May 2023

The count is a count of the content languages on the site

To be more precise: Published content languages.

ofc - should have used more precise language

@Kostelano Please check and report back if the number is shown correctly when you have more than 1 content language published. Thanks in advance.

that's how I concluded it was for content languages ;')

avatar Kostelano
Kostelano - comment - 24 May 2023

Yes, these are content languages.

But, one way or another, something needs to be fixed. For example, a link that should lead to content languages, and not to install languages.

avatar brianteeman
brianteeman - comment - 24 May 2023

yes the link is wrong

avatar richard67 richard67 - change - 24 May 2023
Labels Added: bug
Removed: Information Required
avatar richard67 richard67 - labeled - 24 May 2023
avatar richard67 richard67 - unlabeled - 24 May 2023
avatar alikon
alikon - comment - 28 May 2023

please test #40671

avatar alikon alikon - change - 28 May 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-05-28 07:19:29
Closed_By alikon
avatar alikon alikon - close - 28 May 2023

Add a Comment

Login with GitHub to post a comment