CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • 2.2beta2 alt upgrade works - almost
Pages: [1]

Author Topic: 2.2beta2 alt upgrade works - almost  (Read 2617 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
2.2beta2 alt upgrade works - almost
February 14, 2009, 12:10:37 am
Though the 2.2beta2 upgrade script for Joomla! claims that it doesn't work for upgrades, I found that it does work for me, but has one issue.

  • Files in the codebase which are no longer in 2.2 are not removed

When I start with civicrm 2.1.1, follow the upgrade script, and use the alternate package, it works.

I checked the veracity of the install using the following shell command to find differences between the installation package and the installed files (ie, files which are missing, different, or extra).

Code: [Select]
$ diff -r «civicrm-admin» «installation»/admin

where «civicrm-admin» is the administrator/components/com_civicrm/civicrm directory, and «installation» is the directory containing the unzipped installation package.

There are differences and these can be explained as follows ...

  • civicrm.config.php is edited during the install
  • civicrm.settings.php is created during the install
  • civicrm.xml is copied from the «installation» directory rather than «installation»/admin
  • There are a number of files from 2.1.1 which are no longer in 2.2

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 2.2beta2 alt upgrade works - almost
February 15, 2009, 10:32:33 pm
Ken:

Main problem is in Joomla alt install, joomla installer is not able to replace existing files. So would recommend wait for beta3 or use zip method for upgrade.
Also read http://civicrm.org/node/510#comment-3380

Kurund
Found this reply helpful? Support CiviCRM

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 2.2beta2 alt upgrade works - almost
February 16, 2009, 03:34:43 am
Kurund, Dave,

Can I suggest a solution that doesn't require uninstalling CiviCRM?

You folks may probably tried and discounted this, but, what the heck?
  • Use the FOLDER element of the civicrm.xml file to copy the new codebase to a directory called "civicrm-new"
  • In the CiviCRM install script, JFolder::delete() the existing codebase in the "civicrm" directory
  • In the CiviCRM install script, JFolder::move() the new codebase from "civicrm-new" to the "civicrm" directory

I suspect that the JFolder::delete() and JFolder::move() methods may be too heavyweight for a directory-tree as large as that for CiviCRM, as they seem to tree-walk directories and to (optionally) invoke FTP.

Background

Now, I don't understand why you folks are suggesting that the Joomla! installer doesn't overwrite files.
  • In both versions of the 2.2beta2 install script, the civicrm.xml file has been changed so that the INSTALL element has the METHOD attribute set to "upgrade". This instructs the installer to overwrite files.
  • The Joomla! installer is quite robust, albeit poorly documented, and the Joomla! community has written thousands of extensions which use it. All the extensions I've used permit upgrading and hence overwriting.

My experience is that the installer doesn't update the modification-date on the directories, unless the directory is changed. Perhaps this has led to some confusion that the files aren't being overwritten, when in fact they are? My test with "diff -r" shows that all the files are being overwritten. The problem is that no-longer-used files are not being removed.

Using a civicrm.zip file fixes this problem because the creation of the civicrm directory tree is under the control of the CiviCRM install script. When you use the FOLDER attribute the problem occurs because the Joomla! installer copies the files before the CiviCRM install script is invoked.

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: 2.2beta2 alt upgrade works - almost
February 16, 2009, 04:00:16 am
Quote
I suspect that the JFolder::delete() and JFolder::move() methods may be too heavyweight for a directory-tree as large as that for CiviCRM, as they seem to tree-walk directories and to (optionally) invoke FTP.

I guess this approach will again lead to timeout errors, so IMO we should avoid this. For future releases people will have to uninstall and install CiviCRM during upgrade.

Quote
My experience is that the installer doesn't update the modification-date on the directories, unless the directory is changed. Perhaps this has led to some confusion that the files aren't being overwritten, when in fact they are? My test with "diff -r" shows that all the files are being overwritten. The problem is that no-longer-used files are not being removed.

I am not sure about this.

Kurund

Found this reply helpful? Support CiviCRM

mcsmom

  • I post frequently
  • ***
  • Posts: 266
  • Karma: 23
    • Official Joomla! Book
  • CiviCRM version: 4 and 3.4
  • CMS version: Joomla!
Re: 2.2beta2 alt upgrade works - almost
February 23, 2009, 02:48:00 am
@Ken

Actually the option to use update rather than install in the xml is relatively new (post 1.5).
Previously many extensions (including civicrm) required you to uninstall then reinstall. That's the process you are basically proposing by using delete with JFolder or JFile.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • 2.2beta2 alt upgrade works - almost

This forum was archived on 2017-11-26.