joomla/joomla-cms — pull request #4018 by nikosdion (2014-07-27 17:22:10+00:00)
Title: [#33638] Redirect to homepage when pressing the language flag after page load

Joomla! Tracker Item [#33638](http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33638&start=0)

# Executive summary

On a multilingual site the current language's flag will always get you back to the site's root instead of the currently loaded page.

# Details

Let's say you have a multilingual 3.2 site with French, Greek and English (default) installed.

If you change the language to French (by clicking on the French flag), once the page is loaded if you then click the French flag again, it redirects to the homepage. When you click on the other flags you are transferred correctly to the linked item.

# Issue tracking

The ModLanguagesHelper::getList assumes that if there is no associated item for a language it should link to the homepage. However the active item doesn't have an association to itself on its own language.