? ? ? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
30 Nov 2019

Replaces #24062 which had conflicts

This PR adds a Notice and displays the language concerned when the Content Language for that language has been deleted and remains in the site an orphan home page while the site language is published.
It also adds a Notice when a Content Language is in the trash.

It also reinstate all states of a content language to display the correct icons.
published = 1
published = 0
published = -2 (i.e. trash) and for this one displays the trash icon

It also modifies all the queries in the Helper to use quotename()

See more below

Testing Instructions

Install a multilingual site with all languages available to install
French fr-FR
German de-DE
Persian fa-IR

Then use the Cpanel Multilingual Sample Data module to create a basic.

First test:
Display the Content languages Manager
Trash AND delete the fa-IR Persian content language.

You should get this when displaying the multilingual status module

screen shot 2019-03-02 at 18 25 09

Then unpublish the French fr-FR Content Language.
And trash (do NOT delete) the German de-DE Content language.
I.e. Manager should look like this
screen shot 2019-03-02 at 18 28 10

You should get this when displaying the multilingual status module
screen shot 2019-03-02 at 18 44 18

Unpublish also the fr-FR Home page to get a new notice.
Deleted Content Language error now displays the notice as last.
see #24062 (comment)

Added new Notice when both Content Language and Home page are unpublished.
We should now get in that case:

screen shot 2019-03-03 at 10 22 15

Added notice when both content language and home page missing. added trash icon when home page is in the trash.

screen shot 2019-03-04 at 12 40 18

Added warning icon when home page does not exist.
screen shot 2019-03-04 at 12 56 37

Reminder

It is OK to have an Unpublished Content Language (as French is above) as it lets the site owner prepare a new Language for the multilingual site.

The screenshots were taken in March. They will now rather look like this:
Screen Shot 2019-11-30 at 08 44 07

@Quy
@alikon
Please test and specially look at the queries as I did my best but there could be improvements there.

avatar infograf768 infograf768 - open - 30 Nov 2019
085b315 30 Nov 2019 avatar infograf768 oops
avatar infograf768 infograf768 - change - 30 Nov 2019
Labels Added: ?
78cd2d7 30 Nov 2019 avatar infograf768 cs
530ec1e 30 Nov 2019 avatar infograf768 cs
6f49f62 30 Nov 2019 avatar infograf768 cs
avatar infograf768
infograf768 - comment - 1 Dec 2019

@Quy
Also did other combined queries, as much as I could do.
Could be missing some in the getStatus() method but I honestly think it would make the queries there more confusing than benefiting as we have multiple select.
Also I am not aware if we need or not to also change line 130 join and if we do as on line 123, if we should keep the ' AND ' as is.

May I suggest now to test the results of this PR rather than concentrating on the queries format as that type of format is absent from the majority of 4.0 code.

avatar infograf768
infograf768 - comment - 1 Dec 2019

Done.

avatar joomla-cms-bot joomla-cms-bot - change - 3 Dec 2019
Category Administration com_languages Language & Strings
avatar Quy
Quy - comment - 3 Dec 2019

These are redundant.

The de-DE Content Language is trashed. It will not display on the site.

The Content Language de-DE is trashed.

avatar Quy Quy - change - 3 Dec 2019
Labels Added: ?
avatar infograf768
infograf768 - comment - 4 Dec 2019

These are redundant.

Good find! Corrected.

avatar infograf768
infograf768 - comment - 5 Dec 2019

Still discussing with Mig about some display and content of messages.
Changes would be cosmetic.
So, can be tested but still WIP.

avatar brianteeman
brianteeman - comment - 5 Dec 2019

just a question. Is there a reason that we load this page in a popup and not a regular page

avatar infograf768
infograf768 - comment - 5 Dec 2019

Is there a reason that we load this page in a popup and not a regular page

The reason was that it should be available at any time from any page of admin as some changes can have unwanted consequences on multilingual.

avatar brianteeman
brianteeman - comment - 5 Dec 2019

If it was created like the postinstallation messages wouldn't that satisfy that.

the reason is that the amount of information in the popup is getting quite large and it will be easier to display etc on a full page

avatar infograf768
infograf768 - comment - 5 Dec 2019

It has absolutely nothing to do with postinstallation messages and comparing these is like comparing an apple to a bicycle.

Loading it like it is done for Postinstallation messages, which are usually only loaded once and can be hidden once read, is not what we want for this module as it would force to navigate again to where it was first needed by the user.
In 4.0, it may be a pain as, when using the default Preset menu, one may have to go through the System menu, etc.

Yes, when many aspects are wrong, it can become quite large. It is only because of the possible warnings. These important errors can be easily corrected grace to the informations provided which soon reduces the size. Scroll bars are there to be used if necessary.

This is working fine as is and makes it easier to inform users while preventing useless endless navigation.

Usability is the key word here.

avatar brianteeman
brianteeman - comment - 5 Dec 2019

It has absolutely nothing to do with postinstallation messages and comparing these is like comparing an apple to a bicycle.

I was referring to the location of the link

Loading it like it is done for Postinstallation messages, which are usually only loaded once and can be hidden once read, is not what we want for this module as it would force to navigate again to where it was first needed by the user.

Not if you set a return value

Yes, when many aspects are wrong, it can become quite large. It is only because of the possible warnings. These important errors can be easily corrected grace to the informations provided which soon reduces the size. Scroll bars are there to be used if necessary.

My suggestion removes the need for the scrollbar

Usability is the key word here.

Exactly which is why I make the suggestion

avatar infograf768
infograf768 - comment - 5 Dec 2019

One is totally free to propose, once this PR is completed an d merged, another way to display these informations.
This is obviously not the purpose of this PR.

avatar brianteeman
brianteeman - comment - 5 Dec 2019

Now that I know there is no technical reason I will do

avatar infograf768
infograf768 - comment - 10 Dec 2019

Added a new Error when the Default Site Language has no published Content Language.
As this would totally break the site, It is displayed as an Error on top of other warnings.
To test, unpublish, trash or delete the Content Language related to the Site Default Language.
You should get this:

Screen Shot 2019-12-10 at 08 12 52

The second part of the new message "If not corrected, the multilingual feature will not work!"
could be improved. Proposals welcome!

avatar infograf768
infograf768 - comment - 10 Dec 2019

Changed new string to
COM_LANGUAGES_MULTILANGSTATUS_ERROR_DEFAULT_CONTENT_LANGUAGE="The Content Language for the <strong>%s</strong> default Site Language is unpublished or does not exist. <strong>If not corrected, the multilingual feature may not function properly or the site may not be reachable!</strong>"

Screen Shot 2019-12-10 at 10 48 14

Thanks Mig.

I guess it is now ready to go, as a module.

avatar imanickam imanickam - test_item - 10 Dec 2019 - Tested successfully
avatar imanickam
imanickam - comment - 10 Dec 2019

I have tested this item successfully on 605b87e


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

avatar infograf768 infograf768 - alter_testresult - 11 Dec 2019 - imanickam: Tested successfully
avatar Quy Quy - test_item - 11 Dec 2019 - Tested successfully
avatar Quy
Quy - comment - 11 Dec 2019

I have tested this item successfully on 0cc3ab8


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

avatar Quy Quy - change - 11 Dec 2019
Status New Ready to Commit
avatar Quy
Quy - comment - 11 Dec 2019

RTC


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

avatar HLeithner HLeithner - change - 12 Dec 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-12-12 10:27:03
Closed_By HLeithner
Labels Added: ?
avatar HLeithner
HLeithner - comment - 12 Dec 2019

Thanks

avatar infograf768
infograf768 - comment - 12 Dec 2019

@brianteeman
I can make a new patch implementing what you wanted, with return when Close to the place where the Multilingual status was clicked.
multilang_full page

Is that what you want?

avatar brianteeman
brianteeman - comment - 12 Dec 2019

That is almost what I was talking about - give me one sec

avatar brianteeman
brianteeman - comment - 12 Dec 2019

The url would be
index.php?option=com_languages&view=multilangstatus&return=xxxxxxxxxxx

without the template=component so that it looks to be part of the site

image

avatar infograf768
infograf768 - comment - 12 Dec 2019

I will let you do it. I found some issues here doing it like this when switching to other menus without closing first the multilingual status module.

EDIT: also it lets click again on the module icon and we get into an endless loop as the redirect would now be the multilangstatus module path itself.

avatar infograf768
infograf768 - comment - 12 Dec 2019

In any case the return is obtained by
$redirect = Uri::getInstance()->toString(); in the module default.php

avatar brianteeman
brianteeman - comment - 12 Dec 2019

ok - I will put it on my todo

Add a Comment

Login with GitHub to post a comment