No Code Attached Yet bug
avatar robhuijben
robhuijben
15 Nov 2022

Steps to reproduce the issue

  • Open fresh Joomla! 4 installation for the first time
  • Select Dutch as the language for the installer
  • Fill in username and password and continue to database connection step
  • Choose MySQLi as the preffered DB connection
  • Fill in wrong credentials for the database connection and click "Joomla! installeren"

Expected result

The message that is displayed should be:

Kan geen verbinding maken met de database. Foutmelding: Kon geen verbinding met de database maken.

Actual result

The error message shown is:

Kan geen verbinding maken met de database. Foutmelding: Could not connect to database: No such file or directory

System information (as much as possible)

  • Joomla! 4.2.5

Additional comments

The part that says No such file or directory is also misleading, because in this case it has nothing to do with a file or directory unless this is a reference to the configuration.php file?

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
2.00

avatar robhuijben robhuijben - open - 15 Nov 2022
avatar robhuijben robhuijben - change - 15 Nov 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 15 Nov 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Nov 2022
avatar brianteeman
brianteeman - comment - 15 Nov 2022
avatar tecpromotion
tecpromotion - comment - 15 Nov 2022

@MartijnMaandag can you check this please. Thanks.

avatar zero-24
zero-24 - comment - 15 Nov 2022

Looks like it has nothing to do with the translation package but with the underlying FW Database code which has an hardcoded english error message that includes the error message from the php mysqli driver which is IIRC only aviable in english too. That message will be passed to the error message shown to the users here:

Factory::getApplication()->enqueueMessage(Text::sprintf('INSTL_DATABASE_COULD_NOT_CONNECT', $e->getMessage()), 'error');

and here
Factory::getApplication()->enqueueMessage(Text::sprintf('INSTL_DATABASE_COULD_NOT_CONNECT', $e->getMessage()), 'error');

So we have a few ways to solve this:

  1. Hide the error message comming from the FW database on the CMS level and never pass them to the users
  2. Implement translations for the FW, that would not solve the php drive issue.
  3. When choose by the TT remove the "%s" and set a fixed generic error message and ignore whats comming from the FW database layer on a translation package level.
  4. Implement code which repetes the checks done by the FW or tries to detect what the FW detected maybe by catching specific exceptions and not pass the message from the FW but an new translation string to be added to the CMS.
avatar zero-24
zero-24 - comment - 15 Nov 2022
  • 1 and 2 are just bad ideas.
  • 3 would be an TTs decisione and result into other issues too as generic error messages are bad for searching on the problem and would basicly meaning appling 1. on the translation package level.
  • 4 would be the best solution to me but that involves much more code and the "hope" that all issues do have specific exceptions and should be applied all over the place and not just for the installer.
avatar MartijnMaandag
MartijnMaandag - comment - 28 Nov 2022

Back from holliday ;-)
I think that technical things that come from databases should not all be translated. This way we must translate every text which could come from the database.
In the example above there is even a part translated which helps the user. The "Foutmelding:" shows it is coming from another source.
When I have a problem with a message, I turn from Dutch into English and try to search with the English string to solve the problem ;-)

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023

Add a Comment

Login with GitHub to post a comment