Convert Publication Resources

To convert a version 4.x publication to version 5.2.7.2, you need to convert the publication resources to the new 5.2.7.2 resource file formats. This involves the following tasks:

Convert article-type resource to content-type resource

The new content-type resource format is completely different from the old article-type resource format. The version 5.2.7.2 installation includes a tool (an XSL transformation) that automates this conversion. You will find the tool in your installation's /opt/escenic/engine/contrib/upgrade folder. It consists of the following files:

article-to-content-types.xsl: the actual transformation
xslt: a script to run the transformation on Unix/Linux
xslt.bat: a script to run the transformation on Windows

To run the tool on either platform, add the folder containing the tool to your path, then enter:

xslt article-to-content-types.xsl article-type-path >content-type

where article-type-path is the path to your input article-type resource.

Note that this transformation carries out a one-to-one translation from 4.3 concepts to 5 concepts. The resulting content-type resource may not be completely valid, and may therefore be rejected with validation errors the first time you try to upload it. If this occurs, correct the reported validation errors and try again.

There are some steps you must perform manually while doing this conversion. Those are given below.

  • If you have some <icon> element inside your article-type resource definition then those icon files should be accessible to the system via http. And the url of this resource should be added manually in the new content-type resource. Suppose you had one icon file named bigIcon.gif in the older system as publication resource and your article-type definition has <icon>bigIcon</icon>. In order to make it work you need to upload it in some web location and put the url inside icon definition like this <ui:icon>http://<mysite>/statics/bigIcon.gif</ui:icon>.

  • If you have forum plug-in installed in the version 4.x system then the converted content-type resource will contain one Posting content-type. You need to manually add the following field definitions to that content-type if not present.

    <field mime-type="text/plain" type="basic" name="type">
        <ui:label>Type</ui:label>
        <ui:hidden/>
    </field>
    <field mime-type="text/plain" type="basic" name="email">
        <ui:label>Email</ui:label>
        <ui:hidden/>  
    </field>
    <field mime-type="text/plain" type="basic" name="state">
        <ui:label>State</ui:label>
        <ui:hidden/>
    </field>
    <field type="boolean" name="processed">
        <ui:label>Processed</ui:label>
        <ui:value-if-unset>true</ui:value-if-unset>
        <ui:hidden/>
    </field>
    <field type="boolean" name="accepted">
        <ui:label>Accepted</ui:label>
        <ui:value-if-unset>false</ui:value-if-unset>
        <ui:hidden/>
    </field>
Convert layout resource to layout-group resource

Version 5.2.7.2 offers a great deal of new functionality with regard to section page structure, so you may decide to combine a page redesign with the upgrade, in which case you can just make a new layout-group resource from scratch. Note, however, that whichever method you use, you will need to upload your original 4.x layout resource along with the new layout-group resource when creating the version 5.2.7.2 publication. Also, you need to copy "layouts.dtd" from 4.x to the location of 5.x server, where the layout.xml file is located. If in the 4.x layout resource you have some group or area names containing some illegal characters than uploading the new layout-group resource might fail. You need to manually correct those names after the conversion.

Upgrade image-versions resource (optional)

Version 5.2.7.2 provides new image cropping and sizing functionality that is more flexible than the old image versions functionality, therefore you don't need an image-versions resource. If, however, you want to continue using the old functionality, then you need to add a namespace declaration to the root element of the image-versions resource:

<imageDef xmlns="http://xmlns.escenic.com/2008/image-versions">
...
</imageDef>

Element names in the version 5.2.7.2 XML resource files must always be lower-case. Version 4.x, however, was more lenient and in many cases case-insensitive. The article-type resource, for example, could contain both panel and Panel elements. You must ensure that all element names are lower case before uploading your converted resources, or they will be rejected. The article-to-content-types.xsl conversion tool will not do this for you.