No Code Attached Yet bug
avatar ReLater
ReLater
9 Dec 2022

This find came up in a thread in German forum about another issue with plg_system_redirect.

Steps to reproduce not-translated issue

  • Activate plugin plg_system_redirect with activated setting collect_urls.
  • "Hack" file plugins\system\redirect\redirect.php:
    • In line 257 add line: echo Text::_('PLG_SYSTEM_REDIRECT_ERROR_UPDATING_DATABASE');
    • Frontend: Enter a wrong url to be redirected to the error page,
    • Output at top of page PLG_SYSTEM_REDIRECT_ERROR_UPDATING_DATABASE

Expected result

PLG_SYSTEM_REDIRECT_ERROR_UPDATING_DATABASE translated to An error occurred while updating the database.

Actual result

PLG_SYSTEM_REDIRECT_ERROR_UPDATING_DATABASE not translated

Additional comments

When I set in line 42 protected $autoloadLanguage = true; instead of protected $autoloadLanguage = false; the string is translated.

Question before I provide a PR is if it is by purpose that $autoloadLanguage is false and not true?

avatar ReLater ReLater - open - 9 Dec 2022
avatar joomla-cms-bot joomla-cms-bot - change - 9 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 9 Dec 2022
avatar ReLater ReLater - change - 9 Dec 2022
The description was changed
avatar ReLater ReLater - edited - 9 Dec 2022
avatar SharkyKZ
SharkyKZ - comment - 9 Dec 2022

Question before I provide a PR is if it is by purpose that $autoloadLanguage is false and not true?

Yes, because there is no need to load language files on every request.

avatar ReLater
ReLater - comment - 9 Dec 2022

Yes, because there is no need to load language files on every request.

Where should the language then be loaded?

avatar SharkyKZ
SharkyKZ - comment - 9 Dec 2022

Preferably right before the strings are used.

avatar ReLater
ReLater - comment - 9 Dec 2022

Then I'm out concerning pr and someone else has to take over.

avatar ReLater ReLater - change - 9 Dec 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-12-09 23:34:37
Closed_By ReLater
avatar ReLater ReLater - close - 9 Dec 2022
avatar ReLater ReLater - change - 11 Dec 2022
Status Closed New
Closed_Date 2022-12-09 23:34:37
Closed_By ReLater
avatar ReLater ReLater - reopen - 11 Dec 2022
avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar Hackwar Hackwar - change - 25 Aug 2023
Labels Added: PBF
avatar Hackwar Hackwar - labeled - 25 Aug 2023
avatar brianteeman brianteeman - change - 1 Sep 2023
Labels Removed: PBF
avatar brianteeman brianteeman - unlabeled - 1 Sep 2023

Add a Comment

Login with GitHub to post a comment