? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
9 Oct 2018

Pull Request for Issue #22555

Summary of Changes

Using current url when Active Languages is set to display in the language switcher module and there is no specific menu item for the page.

Testing Instructions

See #22555

Create a multilingual site. Associate articles or not.
Make sure you set Active Language to Yes in the language switcher module.
Create a blog menu item (or list) for articles, but do NOT create any single article menu item.
Click on the title of one of these articles to display it by itself.
In the language switcher module, click on the language or flag for the current language.

Before patch

The link obtained may load the original menu item (in that case the blog or list enu item).

After patch

The link is the current link. It will reload the current page.

Note

We could very easily not add any link in that case, but it would look weird to get a flag or a language name among the others with no action when clicking on it.

avatar infograf768 infograf768 - open - 9 Oct 2018
avatar infograf768 infograf768 - change - 9 Oct 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Oct 2018
Category Modules Front End
avatar infograf768 infograf768 - change - 9 Oct 2018
Labels Added: ?
avatar infograf768 infograf768 - change - 9 Oct 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-10-09 16:12:08
Closed_By infograf768
avatar infograf768 infograf768 - close - 9 Oct 2018
avatar Giuse69
Giuse69 - comment - 9 Oct 2018

this PR has been cancelled to be done under another id?
I like also the idea of current language flag not to be a link: displaying current language is anyway useful to show which is current language (maybe with a CSS style to highlight the lang-active class) but what is the purpose to click on current language? Even it may be more correct of not being clickable since there is nowhere to go to.
Maybe an option in the language switcher module to have active language as a link or not?

By the way, J4.0 is already fixed for this?

avatar infograf768 infograf768 - change - 10 Oct 2018
Status Closed New
Closed_Date 2018-10-09 16:12:08
Closed_By infograf768
avatar infograf768 infograf768 - change - 10 Oct 2018
Status New Pending
avatar infograf768 infograf768 - reopen - 10 Oct 2018
avatar infograf768
infograf768 - comment - 10 Oct 2018

@Giuse69
PR reopened after code corrections. Please test all possibilities (dropdown or not, image or not, show language active or not in each case possible)
At this stage, I have kept a link (corrected) for the active language without adding a parameter to use or not such link in order to be B/C.
The active language has anyway a class lang-active for people who want to customise further.

We can introduce indeed a new parameter in 4.0 to add that link or not.

Note: J4.0 is very late concerning porting staging modifications. Nothing among the new stuff for multingual sites in staging/3.9.0 has been yet ported to 4.0

1783923 10 Oct 2018 avatar infograf768 space
49571ec 10 Oct 2018 avatar infograf768 oops
avatar infograf768
infograf768 - comment - 10 Oct 2018

No, that is not that yet.
We should have nothing there instead of <li></li> as we can get into a bad display when the active language is between 2 non active ones.

avatar infograf768
infograf768 - comment - 10 Oct 2018

I guess it should now be Ok.
Please test...

avatar Giuse69
Giuse69 - comment - 10 Oct 2018

I have tested this item successfully on 7fa679c


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

avatar Giuse69 Giuse69 - test_item - 10 Oct 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 11 Oct 2018

Former test is still Ok.
Please @Quy now test.

avatar infograf768
infograf768 - comment - 21 Oct 2018

Also correcting #22693
Please test again.

avatar infograf768
infograf768 - comment - 21 Oct 2018

I reverted the change JFilterOutput::ampReplace as this will not do the job.
The method replaces single & by &amp; which is not what we want.

avatar infograf768
infograf768 - comment - 21 Oct 2018

OK, now we get back ampersands as & and still use htmlspecialchars for quotes.
Thanks for testing.

avatar imanickam
imanickam - comment - 25 Oct 2018

I have tested this item successfully on 50b798a

I have tested this (as per the testing instructions) successfully on a multilingual site that has English and Tamil (தமிழ்) as content languages.


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

avatar imanickam imanickam - test_item - 25 Oct 2018 - Tested successfully
avatar infograf768
infograf768 - comment - 25 Oct 2018

@Giuse69
please test again in order to get this in 3.9.0

avatar mbabker mbabker - change - 25 Oct 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-10-25 11:43:29
Closed_By mbabker
avatar mbabker mbabker - close - 25 Oct 2018
avatar mbabker mbabker - merge - 25 Oct 2018

Add a Comment

Login with GitHub to post a comment