? ? Pending

User tests: Successful: Unsuccessful:

avatar stellainformatica
stellainformatica
23 Dec 2016

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 # .

Summary of Changes

Added the language definition in formattedtext.php and in en-GB.lib_joomla.ini

Testing Instructions

  1. Set the logs folder unwritable

  2. Enable the laguage debug in global configuration

  3. 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.

Documentation Changes Required

avatar stellainformatica stellainformatica - open - 23 Dec 2016
avatar stellainformatica stellainformatica - change - 23 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Dec 2016
Category Libraries
avatar stellainformatica stellainformatica - change - 23 Dec 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 23 Dec 2016
Category Libraries Administration Language & Strings Libraries
avatar stellainformatica stellainformatica - change - 23 Dec 2016
Title
Update formattedtext.php
Language definitions missing in formattedtext.php
avatar stellainformatica stellainformatica - edited - 23 Dec 2016
avatar stellainformatica stellainformatica - change - 23 Dec 2016
Labels Added: ?
avatar stellainformatica stellainformatica - change - 23 Dec 2016
The description was changed
avatar stellainformatica stellainformatica - edited - 23 Dec 2016
avatar stellainformatica stellainformatica - change - 23 Dec 2016
The description was changed
avatar stellainformatica stellainformatica - edited - 23 Dec 2016
avatar AlexRed
AlexRed - comment - 23 Dec 2016

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.

avatar AlexRed AlexRed - test_item - 23 Dec 2016 - Tested successfully
avatar mbabker
mbabker - comment - 23 Dec 2016

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.

avatar infograf768
infograf768 - comment - 23 Dec 2016

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?

avatar mbabker
mbabker - comment - 23 Dec 2016

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).

avatar infograf768
infograf768 - comment - 23 Dec 2016

OK. I guess that @stellainformatica shoud close this

avatar stellainformatica stellainformatica - change - 23 Dec 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-12-23 16:58:45
Closed_By stellainformatica
avatar stellainformatica stellainformatica - close - 23 Dec 2016

Add a Comment

Login with GitHub to post a comment