? Success

User tests: Successful: Unsuccessful:

avatar davdebcom davdebcom - open - 6 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 6 Feb 2015
Labels Added: ?
avatar davdebcom davdebcom - change - 6 Feb 2015
Title
Update installation error to display source and destination folders #2
Better installation errors #2
avatar zero-24 zero-24 - change - 6 Feb 2015
Easy No Yes
avatar zero-24 zero-24 - change - 7 Feb 2015
Category Installation Libraries
avatar wilsonge
wilsonge - comment - 8 Feb 2015

Hi,
Thanks for introducing this improvement to the CMS!

Please use a language string rather than hardcoding strings so that they are translatable. Also as this will change language strings it will have to wait until after 3.4 release (as we are currently in a language freeze)

avatar brianteeman
brianteeman - comment - 8 Feb 2015

Is it not possible that this could be committed as a special case with the hardcoded strings NOW and then updated to use jtext later?

avatar Bakual
Bakual - comment - 8 Feb 2015

Imho it's not urgent enough to make a special exception for that.

avatar sovainfo
sovainfo - comment - 8 Feb 2015

Suggest to use:
JText::sprintf('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02' . ' : %s => %s' , $src, $dest)

Could be changed later if required

avatar davdebcom
davdebcom - comment - 10 Feb 2015

@sovainfo Changed to match your suggestion

Ready to go?

avatar sovainfo
sovainfo - comment - 10 Feb 2015

Removed the space before the comma to make travis happy, sorry. Made a PR against yours.

What about the other JText::_ calls?
Like line 145 JLIB_FILESYSTEM_ERROR_COPY_FAILED

avatar davdebcom
davdebcom - comment - 10 Feb 2015

@sovainfo Merged into my patch, thanks!

avatar designbengel
designbengel - comment - 14 Mar 2015

Hi Guys, how to test this ? thx


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6002.
avatar wilsonge
wilsonge - comment - 14 Mar 2015

From what I understand you need to install an extension when having not enough file permissions in the components (or some folder that's needed as described in the link in the description) to move files into the directory. Before the patch you'll just see a message "Copy file failed" and after you'll see a message stating what the to and from directory are.

avatar christianhent christianhent - test_item - 14 Mar 2015 - Tested successfully
avatar zero-24 zero-24 - change - 14 Mar 2015
Status Pending Ready to Commit
avatar designbengel
designbengel - comment - 14 Mar 2015

Thanks, - tested successfully - just the translations are missing
JLIB_FILESYSTEM_ERROR_WARNFS_ERR02 : /Applications/MAMP/tmp/php/phpLYx2kB => /Applications/MAMP/htdocs/joomla-cms-staging/tmp/com_patchtester.tar.bz2


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6002.
avatar designbengel designbengel - test_item - 14 Mar 2015 - Tested successfully
avatar zero-24
zero-24 - comment - 14 Mar 2015

RTC based on testing. Thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6002.
avatar brianteeman brianteeman - change - 14 Mar 2015
Labels Added: ?
avatar phproberto
phproberto - comment - 15 Mar 2015

Still requires a fix.

avatar zero-24 zero-24 - change - 15 Mar 2015
Status Ready to Commit Pending
avatar zero-24
zero-24 - comment - 15 Mar 2015

Moving back to Pending based on @phproberto's commet.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6002.
avatar brianteeman brianteeman - change - 15 Mar 2015
Labels Removed: ?
avatar sovainfo
sovainfo - comment - 15 Mar 2015

@davdebcom created pr to add sprintf to line 143

avatar zero-24 zero-24 - change - 15 Mar 2015
Status Pending Ready to Commit
avatar zero-24 zero-24 - change - 1 Apr 2015
Labels Added: ?
avatar infograf768
infograf768 - comment - 2 Apr 2015

This does not work! : the constant is not translated.

the code should be:

diff --git a/libraries/joomla/filesystem/file.php b/libraries/joomla/filesystem/file.php
index cc14b9c..585be6a 100644
--- a/libraries/joomla/filesystem/file.php
+++ b/libraries/joomla/filesystem/file.php
@@ -141,5 +141,5 @@
                if (!@ copy($src, $dest))
                {
-                   JLog::add(JText::_('JLIB_FILESYSTEM_ERROR_COPY_FAILED'), JLog::WARNING, 'jerror');
+                   JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_COPY_FAILED') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');

                    return false;
@@ -520,5 +520,5 @@
                else
                {
-                   JLog::add(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02'), JLog::WARNING, 'jerror');
+                   JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');
                }
            }
@@ -539,5 +539,5 @@
                else
                {
-                   JLog::add(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02'), JLog::WARNING, 'jerror');
+                   JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');
                }
            }
 $src, $dest), JLog::WARNING, 'jerror');

Evidently, as the variables and the hardcoding of => are not in the language string value, we will get weird results for a RTL Language:

screen shot 2015-04-02 at 10 52 15

If we want to also solve this we could do it this way:

if (JFactory::getLanguage()->isRTL())
{
JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %2$s <= %1$s', $src, $dest), JLog::WARNING, 'jerror');
}
else
{
JLog::add(JText::sprintf(JText::_('JLIB_FILESYSTEM_ERROR_WARNFS_ERR02') . ' : %1$s => %2$s', $src, $dest), JLog::WARNING, 'jerror');
}

we would get:
screen shot 2015-04-02 at 11 08 21

avatar infograf768 infograf768 - change - 2 Apr 2015
Status Ready to Commit Pending
avatar infograf768
infograf768 - comment - 2 Apr 2015

PR wrong, setting back to pending until corrected.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6002.
avatar zero-24 zero-24 - change - 2 Apr 2015
Labels Removed: ?
avatar sovainfo
sovainfo - comment - 2 Apr 2015

Added PR fixing translation and ltr by changing the messages in the language files.

avatar infograf768
infograf768 - comment - 2 Apr 2015

@sovainfo
I commented on your PR. I suggest you link it to this and explain there how to test.

avatar sovainfo
sovainfo - comment - 2 Apr 2015

Changed my PR according to instructions from @infograf768. @davdebcom needs to accept my PR if he agrees.

avatar davdebcom davdebcom - change - 2 Apr 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-04-02 17:06:53
avatar davdebcom davdebcom - close - 2 Apr 2015
avatar davdebcom davdebcom - close - 2 Apr 2015
avatar davdebcom davdebcom - head_ref_deleted - 2 Apr 2015

Add a Comment

Login with GitHub to post a comment