Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] [Multilingual Status module] Adding displaying a possible error if URL Language Code is empty #30537

Merged

Conversation

infograf768
Copy link
Member

Summary of Changes

As title says

Testing Instructions

Multilingual site.
Until #30496 make its way to J4, easier way to test is

  1. Enter only symbols like % or & in the URL Language Code field

  2. Unicode Alias being set to No in Global Configuration.
    Example while admin language is en-GB, enter the multibytes Greek characters αω

In these cases there is not yet any error when saving the Content Language, but the URL Language Code (sef) is empty.

In any case, an error may have happened and the sef may be empty in the db.

Patch, modify and save the URL Language Code of one of the Content Languages to save it empty as explained above.

Screen Shot 2020-09-01 at 11 02 32

Display the Multilingual Status module modal window.

Expected result AFTER applying this Pull Request

The multilingual status module will now display an error.

Screen Shot 2020-09-01 at 11 03 05

Documentation Changes Required

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.0-dev labels Sep 1, 2020
@zero-24
Copy link
Contributor

zero-24 commented Sep 1, 2020

hmm should's such a warning not better be a postinstall? given that this is an error that can only happen on sites older than 3.9.22 right?

@infograf768
Copy link
Member Author

As I stated in the description, it may also happen if the db is corrupted and the sef column is empty for a reason or another.
We have no example of this ever happening on the forums. So it is just to be on the safe side.
I think a postinstall would be excessive.

@zero-24
Copy link
Contributor

zero-24 commented Sep 1, 2020

Ok, fine for me.

@@ -66,6 +66,7 @@ COM_LANGUAGES_MULTILANGSTATUS_CONTACTS_ERROR_TIP="Warning! A user/author should
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_HOME_UNPUBLISHED="Both the <strong>%s</strong> Content Language and its Home page are unpublished. <strong>The language will not display on the site.</strong>"
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_MISSING="The <strong>%s</strong> Content Language has been deleted although the corresponding Site Language is enabled and a Home page is assigned to this language. <strong>The language will not display on the site.</strong>"
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_PUBLISHED="Published Content Languages"
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_SEF_MISSING="The \"URL Language Code\" is missing for the <strong>%s</strong> Content Language. <strong>If not corrected, the multilingual feature may not function properly or the site may not be reachable!</strong>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to put the entire second sentence inside strong. It's inside a big red error message so that should be enough emphasis

Copy link
Member Author

@infograf768 infograf768 Sep 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use this phrasing in another string

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>"

It is also useful in this precise case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe omit If not corrected. See line 66 as an example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified both strings taking off If not corrected,

@ghost
Copy link

ghost commented Sep 2, 2020

I have tested this item ✅ successfully on 3cbc6be

Used "&" in URL Language Code > the multilingual status module display an error.


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

@Quy
Copy link
Contributor

Quy commented Sep 2, 2020

I have tested this item ✅ successfully on bb0bf15


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

@infograf768
Copy link
Member Author

RTC as the last change is only a small modification of the string value.


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 3, 2020
@infograf768 infograf768 added this to the Joomla 4.0 milestone Sep 3, 2020
@zero-24 zero-24 merged commit a546ed4 into joomla:4.0-dev Sep 4, 2020
@zero-24
Copy link
Contributor

zero-24 commented Sep 4, 2020

Merging thanks.

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 4, 2020
@infograf768 infograf768 deleted the 4.0_multilingualstatus_sef_error branch September 4, 2020 18:37
dgrammatiko added a commit to dgrammatiko/joomla-cms that referenced this pull request Sep 29, 2020
…om_templates

* '4.0-dev' of github.com:joomla/joomla-cms: (70 commits)
  [4.0] Child templates consistency (joomla#30387)
  [4.0] favicon changes to support child templates (joomla#30388)
  [4.0] Update Readme for Api tests (joomla#30539)
  [4.0] [Multilingual Status module] Adding displaying a possible error if URL Language Code is empty (joomla#30537)
  [4.0] Display of horizontal mod_articles_news module (joomla#30527)
  [4.0] Useless installation lang strings (joomla#30568)
  [4.0] Numbers not digits (joomla#30559)
  [4.0] Accessibility plugin position (joomla#30552)
  [4.0] fix for inherit fields (joomla#30557)
  [4.0] Redundant words (joomla#30555)
  add missing legend to fieldset (joomla#30528)
  [4.0] [a11y] add statement on found results (joomla#30535)
  [4.0] com_finder ul instead of dl for easier styling (joomla#30534)
  [4.0] Messages/Alerts: using icons instead of text as heading (joomla#30516)
  [4.0] Increase API Test Coverage (joomla#26722)
  [4.0] Implementing display of password requirements for frontend (joomla#30473)
  [4.0] FieldsHelper: Choose a first available category  correctly (joomla#30268)
  Sort options (joomla#30531)
  Clear checkboxes on back button (joomla#30498)
  Update _icomoon.scss (joomla#30436)
  ...
sakiss pushed a commit to sakiss/joomla-cms that referenced this pull request Oct 16, 2020
… if URL Language Code is empty (joomla#30537)

* [4.0] [Multilibgual Status module] Adding displaying a possible error if
sef is not set

* Simplify 2 strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Change This is for Translators
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants