?
avatar agilare
agilare
8 Feb 2018

In my Joomla website (recently updated to 3.8.4) I developed a module showing a list of links to Joomla articles.

I stack in a MySQL table a list of articles id of the main language (french). If the visitor is in german part of the site, the module retrieve the (french) article id from this table and use ContentHelperAssociation::getAssociations to find the german equivalent; however with the new condition if ($item->language != JFactory::getLanguage()->getTag()) in getAssociations() method associated articles extracted of the current user language are excluded from the array of articles returned.

Is there a way to bypass this limitation ?

Thank you

avatar agilare agilare - open - 8 Feb 2018
avatar joomla-cms-bot joomla-cms-bot - change - 8 Feb 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Feb 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Feb 2018
Category com_content Feature Request SQL
avatar Bakual
Bakual - comment - 8 Feb 2018

For reference that line was introduced with #19314 (and #19009).

To me it looks like intended behavior of that method to not return the items of the active language.
For your usecase, you should probably do your own method.

avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Feb 2018
Status New Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 21 Feb 2018

@agilare can this Issue be closed?

avatar agilare
agilare - comment - 23 Feb 2018

I understand what @Bakual explains :

intended behavior of that method to not return the items of the active language

but maybe this could be less rigid and could be for example an option, like an additional parameter of method getAssociations which by default exclude current language ?

avatar Bakual
Bakual - comment - 23 Feb 2018

Imho, that usecase is so specific to your needs that it doesn't make sense to support by in core.
Just run your own query and fetch the artciles without using the API.

avatar agilare
agilare - comment - 23 Feb 2018

Of course, if few users are concerned, I would follow the advice of @Bakual
Thank you for your help

avatar brianteeman brianteeman - change - 23 Feb 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-02-23 15:38:24
Closed_By brianteeman
avatar brianteeman
brianteeman - comment - 23 Feb 2018

Closed as expected behaviour

avatar brianteeman brianteeman - close - 23 Feb 2018

Add a Comment

Login with GitHub to post a comment