Pages

Saturday, November 12, 2011

SugarCRM Tips: Wizard-Less Uploads


A few days ago an interesting topic came up on the SugarCRM Forums. 

In short, a user attempting to upgrade their SugarCRM instance ran into a problem in doing so. The problem was the result of a system limitation imposed by the hosting provider, which in turn affected the functionality of the SugarCRM Upgrade Wizard.

For those not familiar with this wizard, a step within it requires one to upload a zip file -- provided by SugarCRM -- containing the various files needed to complete the upgrade. In this particular case, the system limitation restricted the size of the file which one could upload to a size smaller than the zip file that needed to be uploaded. End result: the upgrade files could not be uploaded, and without completing this step, the upgrade cannot be completed.   

However, there is a way to get around this problem, assuming we have the ability to upload files to the server in question through other means, such as FTP or even the File Manager tool in cPanel

So how do we accomplish this in such a way that SugarCRM thinks the files were uploaded via the Upgrade Wizard? Let us take a look.

We will assume that you have already downloaded the files you intended to use via the Upgrade Wizard. If you have not, do so at this point. Upgrades, patches and other install files are available for download here: http://www.sugarforge.org/frs/?group_id=6

For the purposes of this example we will assume we are upgrading from SugarCRM Community Edition version 6.1 to SugarCRM Community Edition version 6.3, using the file SugarCE-Upgrade-6.1.x-to-6.3.0.zip. With the exception of the file names referenced in the instructions below, the steps for your specific scenario should be very similar.

Our first step is to extract the file manifest.php from SugarCE-Upgrade-6.1.x-to-6.3.0.zip. Feel free to perform this step in whichever manner you feel most comfortable, either by unzipping the entire archive first or simply browsing the archive and extracting it. So long as you extract the file, the process does not matter.

It is important that you DO NOT modify the contents of the zip file in any way. i.e. Copy the manifest.php file, but not delete it, etc. We will need the original zip file to complete the process.

Next, save the manifest.php file in a location of your liking and rename it to SugarCE-Upgrade-6.1.x-to-6.3.0-manifest.php. The idea is to simply use the name of the zip file (minus the zip extension) plus a hyphen, as a prefix to the name of manifest.php. 

Lastly, we need to upload the files to the server so that the Upgrade Wizard is tricked into thinking they were uploaded via the normal process. To do so, we will assume we are performing this step via FTP access.

All we need to do to complete the step is to upload both the original zip file and the renamed version of the manifest.php file. Upload both files to the <sugar>/cache/upload/upgrades/patch directory. 

Once the upload completes, you should be able to proceed through the Upgrade Wizard and complete the upgrade of your instance.

6 comments:

  1. Hello Angel, I tried your approach for uploading files to be installed with the module loader. However I don't where to save the files for them to show up in the list of packages to be installed. Do you know how to do it?
    Thanks

    ReplyDelete
  2. I should have said I am running SugarCRM CE 6.4.2

    ReplyDelete
    Replies
    1. From the bottom portion of the post...

      "All we need to do to complete the step is to upload both the original zip file and the renamed version of the manifest.php file. Upload both files to the /cache/upload/upgrades/patch directory. "

      Delete
  3. Exactly what I was looking for. Why is this not part of the SugarCRM documentation?!

    ReplyDelete
    Replies
    1. I would assume it is not there because it is hack of the system. One shouldn't have to use this technique, as there is a mechanism built into the software to handle it already. It is only necessary to know it because sometimes people use SugarCRM within environments that are more restrictive than they should be for the purposes of hosting SugarCRM.

      Delete
  4. Hi Angel, I needed to upgrade my CE platform from 6.1.8 to 6.5.4. I ran into this procedure and everything was working, but when performing the last step (from 6.4 to 6.5.4) I had an error that drives me to bring up the backup and make changes to my database.

    Now that I rolled back to the 6.1.8 version and want to repeat the procedure, when performing the upgrade wizard having previously uploaded my zip and manifest file, the application is not seeing the files and not working.

    Do you have any ideas?

    Many thanks in advance

    ReplyDelete

Your comments, feedback and suggestions are welcome, but please refrain from using offensive language and/or berating others. Thank you in advance.