?
avatar pulsarinformatique
pulsarinformatique
9 Feb 2017

Steps to reproduce the issue

Create a multi language site as usual

Set up the tag language filter (in the tag component options) to CURRENT

Login (as an administrator) on the front end

Edit an article in the front en

Expected result

the article TAG field should display only the tags on the current language

Actual result

BUT the article TAG field displays ALL the tags whatever langage they are assigned to.

System information (as much as possible)

3.7.0 beta 2

Additional comments

avatar pulsarinformatique pulsarinformatique - open - 9 Feb 2017
avatar joomla-cms-bot joomla-cms-bot - change - 9 Feb 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Feb 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 9 Feb 2017

Confirmed on Joomla! 3.7.0-beta3. But: Displayed on Frontend is correct Language-Tag.

avatar infograf768
infograf768 - comment - 9 Feb 2017

Maybe we could just do something like:

diff --git a/libraries/cms/form/field/tag.php b/libraries/cms/form/field/tag.php
index 818c46b..56d21f4 100644
--- a/libraries/cms/form/field/tag.php
+++ b/libraries/cms/form/field/tag.php
@@ -112,4 +112,6 @@
 	{
 		$published = $this->element['published']?: array(0, 1);
+		$app       = JFactory::getApplication();
+		$tag       = $app->getLanguage()->getTag();
 
 		$db    = JFactory::getDbo();
@@ -134,4 +136,9 @@
 		}
 
+		if ($app->isClient('site') && JLanguageMultilang::isEnabled())
+		{
+			$query->where('a.language in (' . $db->quote($tag) . ',' . $db->quote('*') . ')');
+		}
+
 		$query->where($db->qn('a.lft') . ' > 0');

This would filter the Options list in frontend to show only the tags assigned to the current language as to All languages.

avatar infograf768
infograf768 - comment - 10 Feb 2017

Please test #14006

avatar infograf768 infograf768 - change - 10 Feb 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-02-10 08:13:09
Closed_By infograf768
avatar joomla-cms-bot joomla-cms-bot - close - 10 Feb 2017
avatar joomla-cms-bot
joomla-cms-bot - comment - 10 Feb 2017
avatar infograf768
infograf768 - comment - 10 Feb 2017

Closed as we have a patch


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13996.

Add a Comment

Login with GitHub to post a comment