? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
12 Jul 2017

Pull Request for Issue #17053

Summary of Changes

JHelper and JHelperContent do not take into account both ways of setting a lang cookie by the languagefilter plugin.
If the setting is to a year, the cookie is stored separately.
If the setting is set to Session, it is set in the session cookie (this was introduced in #12306 )

com_tags (and possibly some 3rd party extensions) use these classes to display the tags when the parameter is set to use current_language

Testing Instructions

See details in #17053

Set the languagefilter Cookie lifetime to Session:

screen shot 2017-07-12 at 09 45 49

for the following demo, I have created a single tag Mystag.
I have assigned it to the article Another article french tagged to French (fr-FR)
Also to to the article newarticle english tagged to English (en-GB)
And to the article myarticle tagged to ALL content languages.
Create a Tagged Items menu item to display that single tag and make sure Language Filter is set to Current

screen shot 2017-07-12 at 09 53 15

When switching languages, that menu item will now correctly display 2 articles, one set to the Content Language in use, the other set to ALL content languages.
cookies_tags

@mino182
@tonypartridge

avatar infograf768 infograf768 - open - 12 Jul 2017
avatar infograf768 infograf768 - change - 12 Jul 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Jul 2017
Category Libraries
avatar infograf768
infograf768 - comment - 12 Jul 2017

Another solution (which would not touch at the helpers) is to use specifically for com_tags, every time we have a current_language conditional (therefore including the tags modules), JFactory: :getApplication()->getLanguage()->getTag(); instead of JHelperContent::getCurrentLanguage()

@mbabker
@rdeutz

What do you think?

avatar mbabker
mbabker - comment - 12 Jul 2017

I honestly don't know what the purpose of JHelperContent::getCurrentLanguage() is (remember I really don't do multilingual stuff and the sites that I have it on it's all managed by others). The one thing I think seems a little off though is https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/helper/content.php#L159 using the default configured language for the site versus using the active language from JFactory.

avatar infograf768 infograf768 - change - 12 Jul 2017
Labels Added: ?
avatar infograf768
infograf768 - comment - 12 Jul 2017

Namespacing done.

avatar infograf768
infograf768 - comment - 12 Jul 2017

The one thing I think seems a little off though is https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/helper/content.php#L159 using the default configured language for the site versus using the active language from JFactory.

As this is an urgent PR for 3.7.4, I guess it is better, in case we keep modifying the helpers, to leave the rest of the code alone.

avatar infograf768 infograf768 - change - 14 Jul 2017
Priority Medium Urgent
avatar AlexRed AlexRed - test_item - 14 Jul 2017 - Tested successfully
avatar AlexRed
AlexRed - comment - 14 Jul 2017

I have tested this item successfully on 3a4ad0a

Patch ok for me


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

avatar zero-24 zero-24 - test_item - 14 Jul 2017 - Tested successfully
avatar zero-24
zero-24 - comment - 14 Jul 2017

I have tested this item successfully on 3a4ad0a

?


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

avatar zero-24 zero-24 - change - 14 Jul 2017
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 14 Jul 2017

Thanks JM


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

avatar rdeutz rdeutz - close - 17 Jul 2017
avatar rdeutz rdeutz - merge - 17 Jul 2017
avatar rdeutz rdeutz - change - 17 Jul 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-07-17 08:51:20
Closed_By rdeutz
Labels Added: ?

Add a Comment

Login with GitHub to post a comment