? ? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
6 Nov 2021

Pull Request for Issue #35946 .

Same as #35980 but for 4.0-dev.

Summary of Changes

This pull request (PR) changes the input filter type from "cmd" to "string" in the extension installer's language adapter so that spaces and parenthesis are not removed anymore from the extension name in database so that error messages show it right.

In opposite to other extension types where language strings might be provided to translate the name, names of languages should never be translated, neither the English name nor the native name.

That's why there is no need to use the "cmd" filter like it would be when using the name to construct a language string constant from it.

Hint for maintainers

This PR does the same for 4.0-dev as PR #35980 does for 3.10-dev branch.

If that other PR is merged into 3.10-dev, it will appear in 4.0-dev after the next regular upmerge.

So this PR does not necessarily mean to be merged.

But it can be used to test if the change also works in Joomla 4 and later to verify if the upmerge was right.

Testing Instructions

  1. On a clean 4.0-dev branch or latest 4.0.4 release or 4.0 nightly build, install an old version of a language pack where the extension names for the site and the admin language contain spaces and/or parenthesis.
    You can download e.g. the old French and German packages here:
  1. Check the names of the site and the admin languages in database e.g. with phpMyAdmin.
    Result: In opposite to the core English languages, the names of the just installed site and admin languages have spaces and parenthesis stripped off.
    j4-db-after-new-install-without-patch

  2. Go to "System - Manage - Extensions" and try to uninstall some of the previously installed language packs' admin or site languages.
    Result: The warning alert shows the name as it is in database.
    j4-db-try-uninstall-language-without-patch

  3. Apply the patch of this PR.

  4. Make sure that you have switched on "Debug System" and set "Error Reporting" to "Maximum" or "Development" in Global Configuration so you would see any errors happening in the next steps.

  5. Go to "System - Update - Extensions", if necessary use the button to check for updates and then update the 2 old language packs.

  6. Go to "System - Install - Languages" and install some more language(s) suitable for the test, e.g. German (Switzerland).

  7. Check again the names in database.
    Result: The names are as specified in the site and admin language's manifest XML files, no spaces or parenthesis have been stripped off. This is true for both the updated and the newly installed languages.
    j4-db-after-update-with-patch

  8. Go to "System - Manage - Extensions" and try again to uninstall some of the site or admin languages.
    Result: The warning alert shows the name as it is in database, and that's ok now.
    j4-db-try-uninstall-language-with-patch

Actual result BEFORE applying this Pull Request

See testing instructions steps 2 and 3.

Expected result AFTER applying this Pull Request

See testing instructions steps 8 and 9.

Documentation Changes Required

None.

avatar richard67 richard67 - open - 6 Nov 2021
avatar richard67 richard67 - change - 6 Nov 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Nov 2021
Category Libraries
avatar richard67 richard67 - change - 6 Nov 2021
The description was changed
avatar richard67 richard67 - edited - 6 Nov 2021
avatar infograf768 infograf768 - test_item - 7 Nov 2021 - Tested successfully
avatar infograf768
infograf768 - comment - 7 Nov 2021

I have tested this item successfully on 46ebb39


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

avatar imanickam imanickam - test_item - 7 Nov 2021 - Tested successfully
avatar imanickam
imanickam - comment - 7 Nov 2021

I have tested this item successfully on 46ebb39

Tested this successfully on Joomla1 4.0.4


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

avatar richard67 richard67 - change - 7 Nov 2021
Status Pending Ready to Commit
Labels Added: ?
avatar richard67
richard67 - comment - 7 Nov 2021

RTC


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

avatar bembelimen bembelimen - change - 7 Nov 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-11-07 15:26:27
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 7 Nov 2021
avatar bembelimen bembelimen - merge - 7 Nov 2021
avatar bembelimen
bembelimen - comment - 7 Nov 2021

Thx

avatar richard67
richard67 - comment - 7 Nov 2021

Thanks all.

Add a Comment

Login with GitHub to post a comment