User tests: Successful: Unsuccessful:
When you update Joomla, but the log folder is not writable, appears the error:
Cannot write to log file.
The language definition is not present and so it is not translatable in other languages than english.
Pull Request for Issue # .
Added the language definition in formattedtext.php and in en-GB.lib_joomla.ini
Set the logs folder unwritable
Enable the laguage debug in global configuration
Go in the Optons of Joomla Update component and set the parameter Update Channel to Testing, so Joomla will find an update to do. Click on "Install the Update" button and look the error.
You will see that the string "Cannot write to log file." ha not language definition.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Category | Libraries | ⇒ | Administration Language & Strings Libraries |
Title |
|
Labels |
Added:
?
|
There are a lot of Exceptions in the libraries which are very purposefully not translated. Exceptions are typically developer tools and should have a constant value to make debugging easier. The fact this triggers the error page means nothing in the core API is catching this Exception (and a lot of the Exceptions in general, see past rants about Joomla's lack of error handling as a whole) which is a bad move because logging should NEVER be a failing operation.
So from one aspect, I wouldn't suggest going back to pushing all Exception messages through JText. But from another aspect, I doubt Joomla will ever implement correct error handling so you're probably better off accepting.
But from another aspect, I doubt Joomla will ever implement correct error handling so you're probably better off accepting.
Confused. Do you mean that even in this specific case, we should not JText this log error?
Exceptions in general shouldn't be translated. It's happening in Joomla because so many go uncaught and end up being displayed on the error page. Best practice is to catch Exceptions thrown by the libraries and if you need that to raise an error to be displayed to the user (either through the message queue or causing the error page to be triggered) then you create a user friendly text to be displayed.
Exceptions are supposed to be primarily developer based tools and should rarely have translated texts. The fact they leak up to the error page and get displayed with their full text is an issue, not the fact that the text is hardcoded into English. Especially as a lot of Exception messages are not suitable for user display (either too technical or exposing too much system information like when queries fail the entire SQL query gets displayed).
OK. I guess that @stellainformatica shoud close this
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-12-23 16:58:45 |
Closed_By | ⇒ | stellainformatica |
I have tested this item✅ successfully on b5611ad
patch ok
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13351.