Copyright (c) 2002, 2003, 2004 Infrae. All rights reserved.
See also LICENSE.txt

Meta::

  Valid for:  Silva 0.9.3.x
  Author:     Martijn Faassen, Jan-Wijbrand Kolman
  Email:      faassen@infrae.com, jw@infrae.com
  CVS:        $Revision: 1.36.8.12 $

Upgrading from 0.9.1 and below

  Please upgrade your Silva to 0.9.2 first. Be careful to read its
  upgrade instructions! You can find Silva 0.9.2 here:

  "Silva 0.9.2.x":http://www.zope.org/Members/infrae/Silva/

  Please read the UPGRADE.txt included with that release.

Upgrading Silva 0.9.2.x to 0.9.3

  This document applies to upgrading Silva only; if you are newly
  installing Silva please look at 'INSTALL.txt'. If you encounter
  problems you may wish to consult 'TROUBLESHOOTING.txt'.

  NOTE: It makes of course sense to make a backup of Silva before
  trying to upgrade! The simplest way to make sure you have a
  functional backup is to backup the whole ZODB; make a copy of
  'var/Data.fs'.

  Silva Filesystem Products

    In order to upgrade to 0.9.3 you need a new versions of Silva,
    Formulator, XMLWidgets. In addition to this you now need
    ProxyIndex, Annotations, SilvaViews and SilvaMetadata too. The
    Groups product has also been updated.

    Silva Documents are now in a separate package called
    SilvaDocument. This you need to have this Product too.

    You can get a bundle of all required products here:
 
       "Silva-0.9.3.5-all.tgz":http://www.zope.org/Members/infrae/Silva

  Refreshing and upgrading the Silva product

    If you are upgrading from 0.9.2.x to 0.9.3, you need to upgrade
    the content of Silva, as some of the structures have changed.
    After the restart, go to 'service_extensions' in the Silva Root
    as Zope manager and click the 'upgrade content' button. This will
    automatically refresh all installed Silva extensions as well as
    upgrade the Silva content that needs upgrading. Note that this
    will take a while if your site is large.

    In Silva 0.9.3, several reserved ids are added. When the upgrade
    script encounters an object with a reserved id, the object is
    renamed. The renaming is logged to Zope's event log on the file system.
    You need to manually fix all links and references to those object,
    since the upgrade script doesn't upgrade those! The reserved ids are
    the following:

        Members,
        REQUEST,
        acl_users,
        cached,
        cancel,
        code_source,
        content,
        content.html,
        delete,
        edit,
        elements,
        form,
        fulltext,
        getBatch,
        getDocmaFormatName,
        globals,
        index_html,
        insert,
        layout_macro.html,
        logout,
        lookup,
        memberform,
        override.html,
        placeholder,
        preview_html,
        promptWindow,
        quotify,
        redirect,
        render,
        save,
        search,
        standard_error_message,
        standard_unauthorized_message,
        submit,
        up

    Also it's not allowed to have an id starting with 'aq', 'get', 'manage',
    'service' and 'set'.
   
    If you were using the `access restriction by ip address' feature of
    Silva 0.9.2 you need to install Groups before upgrading. During upgrade
    the access restriction properties will be replaced by IP Groups as
    follows:

      If an object has such an access_restriction (AR):

        If the AR is ``allow all'' the role required to view that object is
        set to ``Anonymous'', to ``Viewer'' otherwise.

        If specific IP addresses are given in the AR an IP Group is created.
        All IPs given are added to the newly created IP Group and the 
        ``Viewer''  role is assigned to that group.
    
    Please note that this conversion *is* a change in semantics, so double
    check your security declarations.
  
    As some API changes are introduced you maybe need to fix your
    layout templates and scripts in the Silva root. In case You are
    using the default layout, you should delete the following files
    in the Silva root:

       frontend.css
       get_metadata_element
       index_html
       layout_macro.html
       standard_error_message
       standard_unauthorized_message

    and then install updated versions via the 'install default layout'
    button for the 'Silva' product in the 'service_extensions'

    In case You have custom versions of theses object installed,
    please compare the versions delivered with the old and new
    Silva version (you can find both in the 'layout' directory
    of the product on the file system), and update your custom
    versions accordingly.

    You should be done upgrading now.
 
  Page templates for presentation of public views
    
    The upgrade will likely carry new default versions of the page
    templates and style sheets used for presentation of the public
    website. You can install these examples in your Silva root by
    going to 'service_extensions' in the Silva Root and pressing the
    'install default layout' button.

    Doing this won't overwrite your public layout code; the only
    thing overwritten will be whatever in the current 'default_'
    objects, if any exist. You can then look at this code for
    examples. If you're satisfied with their contents you can also
    rename them to versions without the 'default_' prefix and start
    using them.
 
  Upgrading Custom Content Types.

    If you have custom content types in a separate Zope Product, and
    these content types use same the XML as the Silva Document, you
    should include the objects of your content types in the upgrade
    process.

    For this you need to register an Upgrader associated with
    the meta type of your content type class at the
    'upgrade.registry', before you upgrade. To achieve this, create
    an 'upgrade_093.py' in your product containing 
    something along the lines of the following code:: 

			 from Products.Silva.upgrade import registry, IUpgrader

       class SampleUpgrader:
           """ does some upgrade of my sample document for 0.9.3 """

           __implements__ = IUpgrader

           def upgrade_sampledoc(self, obj):
               # obj is the object to be upgraded
               ... do some upgrade here ...

               # finally return the upgraded object
               return obj

       registry.registerUpgrader(SampleUpgrader(), '0.9.3', 
                                 'My Silva Sample Document')

    Import 'upgrade_093' in the '__init__.py' of your product to make
    sure the registration happens at Zope startup time.

    Note that upgraders registered in the 'upgrade_093.py' of the Silva
    product may also be run on your custom objects, if they are
    registered for any meta type.

    On the other hand if you have a custom Silva root object, you should 
    check the 'upgrade_093.py' for upgraders registered for 'Silva Root'
    and register them for your custom root, too, as otherwise they will
    not be run on your root, leaving some important configuration
    objects in their old state.
