?
avatar BrainforgeUK
BrainforgeUK
22 Oct 2018

When attempting to update an extension where the update server returns an invalid package get the error message "Error updating COM_INSTALLER_TYPE_TYPE_".

This does not provide any meaningful / helpful information.

When JInstallerHelper::unpack(...) on line 445 of update.php returns an invalid package a more meaningfull message should be returned. Such as...

// Unpack the downloaded package file
$package = JInstallerHelper::unpack($tmp_dest . '/' . $p_file);
if (!isset($package['type']))
{
$msg = JText::Sprintf('COM_INSTALLER_MSG_UPDATE_INVALID_PKG', $p_file));
$app->enqueueMessage($msg);
return false;
}

The language file text should read something like:
COM_INSTALLER_MSG_UPDATE_INVALID_PKG="Invalid package file: '%s'"

avatar BrainforgeUK BrainforgeUK - open - 22 Oct 2018
avatar brianteeman
brianteeman - comment - 22 Oct 2018

You shouldnt be getting JUST "Error updating COM_INSTALLER_TYPE_TYPE_".

The code at line 466 shouldnt be getting the type and adding it to the
string
$package['type']

On 22 October 2018 at 13:47, Jonathan Brain notifications@github.com
wrote:

When attempting to update an extension where the update server returns an
invalid package get the error message "Error updating
COM_INSTALLER_TYPE_TYPE_".

This does not provide any meaningful / helpful information.

When JInstallerHelper::unpack(...) on line 445 of update.php returns an
invalid package a more meaningfull message should be returned. Such as...

// Unpack the downloaded package file
$package = JInstallerHelper::unpack($tmp_dest . '/' . $p_file);
if (!isset($package['type']))
{
$msg = JText::Sprintf('COM_INSTALLER_MSG_UPDATE_INVALID_PKG', $p_file));
$app->enqueueMessage($msg);
return false;
}

The language file text should read something like:
COM_INSTALLER_MSG_UPDATE_INVALID_PKG="Invalid package file: '%s'"


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#22762, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8UTHh3wtOluPuZOj_jvDnHoSEthlks5unb5QgaJpZM4XzUhD
.

--
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar joomla-cms-bot joomla-cms-bot - labeled - 22 Oct 2018
avatar BrainforgeUK
BrainforgeUK - comment - 22 Oct 2018

Created pull request with code changes for this.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22762.

avatar joomla-cms-bot joomla-cms-bot - close - 22 Oct 2018
avatar Quy Quy - change - 22 Oct 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-10-22 19:51:42
Closed_By Quy
avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Oct 2018

Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/22762

avatar Quy
Quy - comment - 22 Oct 2018

Closing per PR #22763


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22762.

Add a Comment

Login with GitHub to post a comment