?
avatar alejandrovega
alejandrovega
17 Apr 2020

Steps to reproduce the issue

  • Install a clean 3.9.16, with 2 languages and enable multilanguage in the installation process.
  • Check that you have the sample data in at least 2 languages, go to Components > Tags
  • Create some tags and assign them to each language
  • Go to System > Global Configuration > Tags > Item Selection Tab > Language Filter,
    Here change the default option to Current
    alejandrovega-language-filter
  • Go to your Articles, open one in the language you want and try to add tags
    alejandrovega-tag-filer

Expected result

Tags are filtered based on the current language.

Actual result

All tags are available in selection.

System information (as much as possible)

OSX 10.14 - Debian 9.12
Clean J 3.9.16 with multilanguage
PHP 7.4.2 & PHP 7.3.9
MySQL 5.7.26

Additional comments

Also tested in two different live sites.

avatar alejandrovega alejandrovega - open - 17 Apr 2020
avatar joomla-cms-bot joomla-cms-bot - change - 17 Apr 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Apr 2020
avatar infograf768
infograf768 - comment - 17 Apr 2020

The Language Filter field in the Item Selection tab only controls the list layout, as stated as info.
These settings control which items get selected in the Tagged Items list layouts.

avatar infograf768
infograf768 - comment - 17 Apr 2020

In fact, the filtering in the tag field does also work in frontend when editing an item, but not in backend.

		$app       = Factory::getApplication();
		$tag       = $app->getLanguage()->getTag();

and further

		// Limit Options in multilanguage
		if ($app->isClient('site') && Multilanguage::isEnabled())
		{
			$lang = ComponentHelper::getParams('com_tags')->get('tag_list_language_filter');

			if ($lang == 'current_language')
			{
				$query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')');
			}
		}

I.e. it filters by the site language and All languages in site only.
Maybe because in backend, the item language may not be set and therefore set to All, even when multilanguage is on as we can't base the language used in frontend on the language used in backend.

avatar alejandrovega alejandrovega - change - 17 Apr 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-04-17 20:05:22
Closed_By alejandrovega
avatar alejandrovega
alejandrovega - comment - 17 Apr 2020

Ok, I see more clearly whats happen now, thank you for pointing that.

Yes this works fine for the frontend, I had made the assumption that the filter worked based on the language selection made in the backend for both (front and backend) in Extensions > Languages > Installed.

Thank you.

avatar alejandrovega alejandrovega - close - 17 Apr 2020

Add a Comment

Login with GitHub to post a comment