RTC bug PR-4.4-dev Pending

User tests: Successful: Unsuccessful:

avatar chrisdavenport
chrisdavenport
4 Apr 2024

Pull Request for Issue #43206 .

Summary of Changes

Language file is now loaded before outputting the warning message.

Testing Instructions

Arrange for an extension update site to have an invalid URL (eg. temporarily mangle the URL in the extensions database). Then run php cli/joomla.php update:extensions:check from the command line.

Actual result BEFORE applying this Pull Request

Warning message: [WARNING] JLIB_UPDATER_ERROR_OPEN_UPDATE_SITE

Expected result AFTER applying this Pull Request

Warning message something like
[WARNING] Update: Could not open update site #4 "xxxxxxxxxxx Package Update Site", URL: https://example.com/xxxxx/update.xml

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar chrisdavenport chrisdavenport - open - 4 Apr 2024
avatar chrisdavenport chrisdavenport - change - 4 Apr 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2024
Category Libraries
avatar chrisdavenport chrisdavenport - change - 4 Apr 2024
The description was changed
avatar chrisdavenport chrisdavenport - edited - 4 Apr 2024
avatar chrisdavenport chrisdavenport - edited - 4 Apr 2024
avatar brianteeman
brianteeman - comment - 4 Apr 2024

Not usre this is the correct fix. Everything else in the cli is hardcoded english strings and not translatable

avatar chrisdavenport
chrisdavenport - comment - 4 Apr 2024

Not sure what the "official" convention is so you'll need to educate me on that. However, from looking at the code, log messages are untranslated English strings, but messages intended for CLI output, which is the case here, are translated into the default language. This PR ensures that the CLI user gets to see the same message as the web user in the default language.

avatar brianteeman
brianteeman - comment - 4 Apr 2024

are you sure? Everything here is hardcoded english

image

avatar chrisdavenport
chrisdavenport - comment - 4 Apr 2024

If the convention is that the CLI is always in English, then fine, I've learnt something today. :-)

But, thinking about it, the code I'm modifying here (UpdateAdapter.php) is also used by the web interface (when you click "Check For Updates"), so it needs to be translated. The correct language file is already loaded in the web interface, but isn't for CLI.

Or maybe a better fix would be to load the lang file in cli/joomla.php? Dunno.

avatar alikon
alikon - comment - 4 Apr 2024

i'll do it in the CheckUpdatesCommand

image

and only the html_entity_decode in the UpdateAdapter

my 0.02 €

avatar chrisdavenport chrisdavenport - change - 4 Apr 2024
Labels Added: bug PR-4.4-dev
avatar chrisdavenport
chrisdavenport - comment - 4 Apr 2024

@alikon Okay, done.

avatar alikon alikon - test_item - 4 Apr 2024 - Tested successfully
avatar alikon
alikon - comment - 4 Apr 2024

I have tested this item ✅ successfully on 223769c


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

avatar viocassel viocassel - test_item - 4 Apr 2024 - Tested successfully
avatar viocassel
viocassel - comment - 4 Apr 2024

I have tested this item ✅ successfully on 223769c


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

avatar alikon alikon - change - 4 Apr 2024
Status Pending Ready to Commit
avatar alikon
alikon - comment - 4 Apr 2024

RTC


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

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
Untranslated string for warning message in update:extensions:check CLI
[4.4] Untranslated string for warning message in update:extensions:check CLI
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar MacJoom MacJoom - change - 26 Apr 2024
Labels Added: RTC
avatar MacJoom MacJoom - change - 26 Apr 2024
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2024-04-26 15:44:55
Closed_By MacJoom
avatar MacJoom MacJoom - close - 26 Apr 2024
avatar MacJoom MacJoom - merge - 26 Apr 2024
avatar MacJoom
MacJoom - comment - 26 Apr 2024

Thank you!

Add a Comment

Login with GitHub to post a comment