User tests: Successful: Unsuccessful:
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
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
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
You should get this when displaying the multilingual status module
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:
Added notice when both content language and home page missing. added trash icon when home page is in the trash.
Added warning icon when home page does not exist.
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:
@Quy
@alikon
Please test and specially look at the queries as I did my best but there could be improvements there.
Labels |
Added:
?
|
Done.
Category | ⇒ | Administration com_languages Language & Strings |
These are redundant.
The de-DE Content Language is trashed. It will not display on the site.
The Content Language de-DE is trashed.
Labels |
Added:
?
|
These are redundant.
Good find! Corrected.
Still discussing with Mig about some display and content of messages.
Changes would be cosmetic.
So, can be tested but still WIP.
just a question. Is there a reason that we load this page in a popup and not a regular page
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.
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
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.
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
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.
Now that I know there is no technical reason I will do
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:
The second part of the new message "If not corrected, the multilingual feature will not work!"
could be improved. Proposals welcome!
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>"
Thanks Mig.
I guess it is now ready to go, as a module.
I have tested this item
I have tested this item
Status | New | ⇒ | Ready to Commit |
RTC
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:
?
|
Thanks
@brianteeman
I can make a new patch implementing what you wanted, with return when Close to the place where the Multilingual status was clicked.
Is that what you want?
That is almost what I was talking about - give me one sec
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.
In any case the return is obtained by
$redirect = Uri::getInstance()->toString();
in the module default.php
ok - I will put it on my todo
@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.