You are not logged in Log in Join
You are here: Home » Members » MacGregor's Home » ExtFile/ExtImage » Upgrade ExtFile/ExtImage objects

Log in
Name

Password

 
 

Who must upgrade?

You only have to use/apply the UpgradePatch if all of the following is valid to you:

  • You are using ExtFile/ExtImage
  • You actually have ExtFile/ExtImage objects on you Zope server.
  • Some or all of those objects were created with an older version of ExtFile/ExtImage.
  • You want to use the current version of ExtFile/ExtImage

Why must I upgrade?

Due to internal changes in the current version (1.1.0 and above) of the ExtFile/ExtImage product it is required, that all objects that were created using an older version of ExtFile (all versions before 1.1.0 final, including the 1.1.0 beta releases) are upgraded, using the UpgradePatch_to_1.1.x.

Objects created with the current version don't need to be upgraded (thou it wont hurt them). The patch must be applied once. Thou it does not harm, applying it multiple times, the patch should be removed after having been applied successfully.

What happens during upgrade?

The Upgrade patch recursively searches the object tree for ExtFile and ExtImage instances and applies a patch to them.

The modifications applied in the patch include the removal of attributes, that have been replaced by methods and a type conversion for the 'filename' attribute, that has been changed from a string to a list.

Furthermore, the patch checks, if all objects are sane (i.e. if the external files are existent) and touches them. This allows you to easily check, which files in the repository are unreferenced and can be deleted.

Thou the patch really should not do any harm to your Zope and the changes that are made to the ExtFile/ExtImage objects can be undone, it is recommended that you backup your Data.fs before applying the patch.

How do I upgrade?

  1. Install the new ExtFile/ExtImage version.
  2. Copy ExtFilePatch.py to your Extensions directory.
  3. Backup your Data.fs. (just to be on the safe side)
  4. In the root folder of your zope application add an External Method. Enter 'patch' as function name and 'ExtFilePatch' as module name.
  5. In the External Method click the 'Test' or 'Try it' tab to apply the patch. You see a summary of all objects that where patched and if there was an error.
  6. After the patch has been applied to all ExtFile/ExtImage objects successfully, you can remove the patch object from the root folder.
  7. You might want to pack you Data.fs afterwards.