Skip to main content
Skip table of contents

Xeditor schemas upgrade

Xpublisher recently introduced some breaking changes to its schema. For this reason, your existing schema need to be updated. In case of any already performed customizations, it will require a few additional steps.

General information

Xpublisher schema now have a new version, 2.x. Currently, censhare uses version 0 that needs to be replaced.

The main difference is that the table plugin has changed and will stop working. But there are also some other changes in the base schema.

Before upgrading

Check if the new schema already exist in your system by searching for Xeditor schema assets with the following resource keys censhare-base@2.0 and censhare:scs@2.0. If they don't exists, you need to add them first.

Create new base schema

  • Create a new asset of type Module/Xeditor module/Xeditor Schema

  • Name it 'Xeditor censhare base schema 2.0'

  • Enable resource key and set resource key to censhare-base@2.0

  • On the newly created asset, go to the Administration tab and locate the 'Files' widget

  • Upload this zip  censhare-base@2.0.zip onto the Files widget, so that it becomes the master storage item for the asset.

Create new SCS schema

Repeat the steps from above, but with the following values:

  • Asset name: 'Xeditor Standard Content Structure schema 2.0'

  • Resource key: censhare:scs@2.0

  • Storage item:  scs@2.0.zip

Upgrade schema with no previous customizations

If no customizations have been done in the Xeditor schema – meaning that the customer is only using "Xeditor Standard Content Structure schema" – you have two options for performing a smooth upgrade.

Add new schema as Resource replace variant to the schema asset

The easiest upgrade path would be to add the new SCS schema as Resource replace variant (RRV) to the old SCS schema.

Steps
  • Locate Xeditor schema assets with the resource key censhare:scs@0.0

  • Switch to the Administration tab and locate the widget 'Resource replace variants'

  • Click on ➕ and add the new schema 'Xeditor Standard Content Structure schema 2.0' as RRV

Replace all schema references on text and template assets

Another option is to change the schema on all existing Xeditor text and template assets to this new schema: 'Xeditor Standard Content Structure schema 2.0'. To avoid doing this manually, you can use this XSLT transformation: change xeditor schema reference.xsl . Simply adopt it to your needs and run it an the XSLT evaluator test in the Java Client before using it.

Upgrade previously customized schemas

Prerequisites

  • Make sure you have a development environment for this! For partners, it needs to be obtained from the 3d-party provider, Fabasoft Xpublisher.

  • censhare schemas source files for version 2.x will be provided from censhare.

Steps

Change index.js

  1. Replace reference to the old schema with the new one:

    1. In your schema folder, locate ./src/js/index.js and open it in an editor.

    2. Change dependsOn: 'censhare-base@0.0' to dependsOn: 'censhare-base@2.0'

  2. Remove the reference to a readonly plugin. The script for the readonly plugin is no longer required and may in some cases make preview to fail when large tables are used. Therefore you need to remove the reference to it.

    1. In the function getEditorConfig, remove enableReviewbar: !isReadOnly, 

    2. Locate getPluginsConfig: function() in the script and change it to:

      JS
      getPluginsConfig: function() {
          return require('./config/plugins')()
      },
    3. Alternatively, you can also completely delete the file ./src/js/config/plugins_readonly.js

Change table configuration (SCS)

If the custom schema is using a table configuration from the original Standard Content structure, then follow the steps below to update the schema to the new configuration.

  • in plugins.js

    • Open ./src/js/config/plugins.js in an editor.

    • Locate and replace 'uxxeditorhtmltable' configuration with the 'uxxeditortable' configuration from the scs@2. schema

  • in ‘external_toolbar.js’ : External toolbar for tablea has also changed.

    • Sync changes in the ./src/js/config/external_toolbar.js with the new scs@2.0 schema.

    • If you also sync xeditor.ribbon.view with scs@2.0, you will also need to update files in ./static/phrases

Adapt custom table configuration

If your schema has a customized table configuration, you may also need to adapt other scripts based on the new table plugin. Please refer to the official Xeditor documentation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.