? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
2 Feb 2015

This speeds up the helper of mod_languages a bit and reduces the amount of code.

Line 40-49: Instead of cycling through all menu items and checking each if it is a home menu item, we are cycling through all languages (which should be a lot less than the menu items) and only retrieve the home menu item per language.

Line 64 + 65: The option parameter in Joomla only allows ASCII characters and class names are case insensitive. At the same time, JPATH_COMPONENT_SITE is already sanitized and does not need to be sanitized again. This could prevent loading JString unnecessarily.

Line 106: All links have to be processed by JRoute, regardless of SEF URLs being enabled or not.

Line 110: We are already checking if the currently processed language is the currently active language. We can use that result and thus remove the call in former line 75.

Line 114ff: The Itemid of a home menu item is always removed and thus we don't need a special case for SEF/non-SEF URLs.

avatar Hackwar Hackwar - open - 2 Feb 2015
avatar jissues-bot jissues-bot - change - 2 Feb 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 3 Feb 2015
Category Front End Modules
avatar jsubri
jsubri - comment - 12 Feb 2015

upgraded from 3.3.6 to 3.4 beta3, with 5952 the side effect is the UK flag is now displayed on all FrontEnd pages when it was not the case in 3.3.6.

5952-flags

Use case below.

5952

I've only 1 unpublished article in English (that says: site not avail in English) to cover the unprobable case someone tries /index.php/en

With 5952 , /index.php/en returns a 404 while 3.3.6 return the "site not avail in English" article.

avatar infograf768
infograf768 - comment - 13 Feb 2015

Confirming @jsubri findings

A content language flag is displayed in the module although it does not have any Home page.

avatar infograf768
infograf768 - comment - 13 Feb 2015

Forgot to say that I do not get a 404 here (which is the correct way to do things) because I had a category and an article published both tagged to that content language without home page.
The page obtained by clicking on the flag is quite empty, showing modules tagged to ALL.

avatar Hackwar
Hackwar - comment - 13 Feb 2015

Should be fixed. Please test again

avatar infograf768
infograf768 - comment - 13 Feb 2015

Indeed, issue fixed here.

avatar jsubri
jsubri - comment - 13 Feb 2015

Works for me, the language flag is not displayed anymore and the 404 behaviour is correct for unpublished article.

avatar Hackwar
Hackwar - comment - 13 Feb 2015

So, do we have 2 successfull tests then?

avatar jsubri
jsubri - comment - 13 Feb 2015

yes

avatar rdeutz rdeutz - change - 13 Feb 2015
Status Pending Ready to Commit
avatar rdeutz rdeutz - alter_testresult - 13 Feb 2015 - infograf768: Tested successfully
avatar rdeutz rdeutz - alter_testresult - 13 Feb 2015 - jsubri : Tested successfully
avatar infograf768 infograf768 - change - 14 Feb 2015
Labels Added: ?
avatar infograf768 infograf768 - change - 14 Feb 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-02-14 07:12:01
avatar infograf768 infograf768 - close - 14 Feb 2015
avatar infograf768 infograf768 - reference | - 14 Feb 15
avatar infograf768 infograf768 - merge - 14 Feb 2015
avatar infograf768 infograf768 - close - 14 Feb 2015
avatar infograf768
infograf768 - comment - 14 Feb 2015

Thanks.

avatar roland-d roland-d - change - 14 Feb 2015
Milestone Added:
avatar Hackwar Hackwar - head_ref_deleted - 6 Jan 2016

Add a Comment

Login with GitHub to post a comment