4

My current version is 3.6.0. When I was trying to directly upgrade to 3.6.2, I always get this error message:

Download of update package failed.

I've done upgrading on the same site several times but have never encountered this problem. I checked the configuration.php file, and /tmp folder is set to 0755. Also I looked at the error log, there is no information regarding the failure.

What could possibly be the cause and where can I get more detailed error message than just "download failed"? I host this site on my own virtual server.

2
  • Have you tried performing the update manually but uploading and installing the update package?
    – Lodder
    Commented Aug 16, 2016 at 19:59
  • Not yet. I am obsessed by this issue and if I upgrade the other way I won't be able to reproduce the scenario
    – shenkwen
    Commented Aug 16, 2016 at 20:10

5 Answers 5

5

You can download the Joomla upgrade package and place it in the tmp folder using FTP.

Then run the installation again. It will work.

2
  • This worked for me.
    – Ejaz
    Commented Aug 23, 2016 at 22:24
  • This also worked for me. You don't need to extract the archive folder just place the update package in the tmp folder and click the update button. Commented Jan 4, 2017 at 11:29
2

Make sure your Joomla Update Component is updated, you might have to Clear Cache and Find Updates under ExtensionsManageUpdate.

Joomla Update Component Update

If you have Akeeba Backup installed, make sure it's also updated, just in case.

1
  • I've every extension updated, nothing in "Warnings" section, but still it won't update from 3.6.0 to 3.6.2.
    – Ejaz
    Commented Aug 23, 2016 at 22:16
1

I had the same problem when trying to update Joomla from 3.6.2 to 3.6.3. On the first instance, I uploaded the zipfile and could execute the update that way. So for all you folks out there that want the easy way: simply download the update zipfile and do the update that way.

Anyway, on the second 3.6.2 instance, I finally ended up patching the code to follow redirects. The update to 3.6.3 succeeded! And off course, it overwrote my patched code. :-))

What I basically did is patch the JHttpTransportStream.request() function in the file libraries/joomla/http/transport/stream.php

#BNN DEBUG BEGIN
//      OLD CODE
//      return $this->getResponse($headers, $content);
//      NEW CODE
        $response = $this->getResponse($headers, $content);
        if($response->code==302 && $options['follow_location']==1) {
            //received HTTP/302 Redirect, find "Location:" header
            error_log('BNN DEBUG Location='.$response->headers['Location']);
            return $this->request($method, new JUri($response->headers['Location']), $data, $headers, $timeout, $userAgent);
        }
        return $response;
#BNN DEBUG END
1

File /administrator/components/com_joomlaupdate/models/default.php

Search this string:

if (!$result || ($result->code != 200 && $result->code != 310))

Add new codes:

if (!$result || ($result->code != 200 && $result->code != 310 && $result->code != 303 && $result->code != 302))

That is all.

(The same solution for the new version 3.6.5)

0

I did a little debugging and it looks like the file that is being downloaded - Joomla_3.6.2-Stable-Update_Package.zip is behind a redirection. On line 315 of com_joomlaupdate/models/default.php I have:

// Download the package
$result = $http->get($url);

where i get $result->code = 302 but no file gets downloaded. There needs to be some error checking here but I don't know enough about Joomla to say what. Does anyone know how to have this get request to then follow the redirect and download the file as I think that would be the correct fix.

I currently can't add a comment here so I wrote this instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.