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

Meta::

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

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.

    Silva:
    
        "Silva-0.9.3.tar.gz":http://www.zope.org/Members/infrae/Silva/Silva-0.9.3.tgz

    SilvaDocument:
    
        "SilvaDocument-0.9.3.tar.gz":http://www.zope.org/Members/infrae/Silva/Silva-0.9.3.tgz

    Formulator:

        "Formulator-1.6.1.tgz":http://www.zope.org/Members/infrae/Formulator/Formulator-1.6.1.tgz

    XMLWidgets:

        "XMLWidgets-0.10.3.tar.gz":http://www.zope.org/Members/infrae/XMLWidgets/XMLWidgets-0.10.3.tgz

    ProxyIndex:

        "ProxyIndex-1.1.2.tgz":http://www.zope.org/Members/infrae/Silva/ProxyIndex-1.1.2.tgz

    Annotations:

        "Annotations-0.4.3.tgz":http://www.zope.org/Members/infrae/Silva/Annotations-0.4.3.tgz

    SilvaMetadata:

        "SilvaMetadata-0.7.5.tgz":http://www.zope.org/Members/infrae/Silva/SilvaMetadata-0.7.5.tgz

    SilvaViews:

        "SilvaViews-0.9.tgz":http://www.zope.org/Members/infrae/Silva/SilvaViews-0.9.tgz
    
    Alternatively You can get a bundle of all required products at:
 
         "Silva-0.9.3-all.tar.gz":http://www.zope.org/Members/infrae/Silva/Silva-0.9.3-all.tgz


  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.

    As this process recreates a few internal services, namely the
    one registering the views for the Silva content objects, you
    need to refresh all products via the 'refresh all' button in the
    'service_extensions' in the next step. Additionally you should
    install the 'SilvaDocument' extension.

    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 upgrade function associated with
    the meta type of your content type class at the
    'upgrade_registry', before you upgrade. to achieve this place
    something along the lines of the following code in the
    '__init__.py' of your product::

       from Products.Silva.upgrade import upgrade_registry, upgrade_list_titles_in_parsed_xml

       def upgrade_sampledoc(obj):
		       for o in obj.objectValues():				
			         upgrade_list_titles_in_parsed_xml(o.documentElement)

      upgrade_registry.register('Silva Sample Document', upgrade_sampledoc)

    The helper function 'upgrade_list_titles_in_parsed_xml' actually
    does all the XML upgrades mentioned in the section above.

    If you only need to update the "last author" information, you do
    not need to take any action; the upgrade process will do this
    automatically for you.

    You also may want to take a look at the most current version of
    the "SilvaDemoExtension
    Product":http://cvs.infrae.com/SilvaDemoExtension/ for an example
    of upgrading a custom content type.
