ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Installation

Get the packages

As of eZ Publish Enterprise 4.7, if you install the demo design package, setup is already done for you. 

If you have a eZ Publish Enterprise, you'll be able to download a supported stable version for your eZ Publish Enterprise version from your service portal on support.ez.no.

Copy the extension

After downloading the source code of eZ Content Staging (folder named ezcontentstaging), you must copy ezcontentstaging into your ezpublish_legacy/extension directory.

Target and Source Servers Installation
Target Server:

1. Unzip the extension and enable it. Make sure to regenerate autoloads and clear caches (please refer to the end of the document for instructions);

2. Add a table in the database used by your eZ Publish instance. You can do so as follows:

    From eZ Publish root directory, in case you are using MySQL:

$ mysql -u <user> -p <database_name> < (your eZ Publish root)/ezpublish_legacy/extension/ezcontentstaging/sql/mysql/mysql.sql

Note: The procedure is very similar in case you are using another RDMS. You may want to have a look at the sql/oracle and sql/postgresql for Oracle and PostgreSQL databases respectively. Please refer to the documentation reference for your DBMS if you are experiencing issues.

3. Enable rewrite rules to make the REST api accessible. See the documentation here.

4. Disable oauth authentication (use basic auth with or without https):

edit rest.ini.append.php:
[Authentication]
AuthenticationStyle=ezpRestBasicAuthStyle

5. Make sure there is a user account that has enough rights to create/read/update/delete any content, e.g.: admin

Source Server:

1. Unzip the extension and enable it. Make sure to regenerate autoloads and clear (please refer to the end of the document for instructions);

2. Add a table in the database used by your eZ Publish instance. You can do so as follows:

    From eZ Publish root directory, in case you are using MySQL:

$ mysql -u <user> -p <database_name> < (your eZ Publish root)/ezpublish_legacy/extension/ezcontentstaging/sql/mysql/mysql.sql

    Note:  The procedure is very similar in case you are using another RDMS. You may want to have a look at the sql/oracle and sql/postgresql for Oracle and PostgreSQL databases respectively. Please refer to the documentation reference for your DBMS if you are experiencing issues.

3. Enable all the needed workflow events:

    3.1. Create one workflow per trigger for all content-related triggers

    3.2. Add, to each workflow, one event of "stage <XXX>" type

    3.3. Add each workflow to one trigger

          . add location: after

          . remove location: before

          ...

          Note that for each one of the 15 operations relating to content, 2 triggers are available: Before and After.

          You do not need to create 30 workflows, but only 15. Each workflow will be usable with the correct trigger type (either Before or After).

    3.4. If you have existing workflows (e.g.: Content Approval), insert the "stage" event where you find appropriate

4. Define target feed:

    4.1. Make sure all content classes, sections, languages, object stages, are have the same definition on source and target server (this must be done manually).

    4.2. Edit contentstagingsource.ini.append.php:

[GeneralSettings]
TargetList[]=<feedname>
[Target_<feedname>]
Name=<A descriptive name for this export feed>
TransportClass=eZRestApiEmbeddedClientStagingTransport
RemoteIdGeneratorClass=eZContentStagingSameRemoteIdGenerator
Server=<server_feedname> note: this can be the same or different from feedname, but has to be the same as used in wsproviders.ini
Subtrees[]=<local_root_node_id>
RemoteSubtrees[]=<target_root_node_id>

            Make sure that for all root nodes of the feed in the source server, there is a corresponding root node on the target server

     4.3. Edit wsproviders.ini.append.php:

[<server_feedname>]
providerType=REST
providerUri=<url to rest api on target server, including the final part, eg: http://my.server.com/api/contentstaging/v1/>
Options[]
Options[authType]=1 (for basic auth)
Options[login]=<username>
Options[password]=<password>

5. In the Administration Interface, go to the "Setup" tab and click on the "Content Staging" link, in the left-col menu. You should see the target feed listed. Click on the "Check" link to verify that it is properly setup. Click on the "Initialize Feeds" button and synchronize the event generated.        

Remember to:
Activate eZ Content Staging

As with other common extensions, the extension can be activated both from the Administrator Interface and the setting file. Using the first way, you must log in to the Administrator Interface, click the Setup tab, then open the Extensions link in the left hand menu. A list will appear with all the Available extensions, where you must check the ezcontentstaging box to select the extension. The click the button Update to activate the extension.

If you prefer to use the second way, open (your eZ Publish root)/ezpublish_legacy/settings/override/site.ini.append.php and add the activation configuration under the "ExtensionSettings" section like this:

[ExtensionSettings]ActiveExtensions[]=ezcocontentstaging

Note: ezcontentstaging should be before ezwebin in site.ini.

Regenerate autoload arrays

After activating eZ Content Staging, it is necessary to regenerate the autoload arrays. This can be done from the Administrator Interface after you have activated the extension as described in the previous step. When you have applied the changes simply click on the Regenerate autoload arrays for extensions.

You can also generate the autoload arrays by running the following script from your ezpublish_legacy directory:

php bin/php/ezpgenerateautoloads.php -e
Clear cache

Don't forget to clear the cache. You can clear INI and template caches from the Setup tab in the Administrator Interface or by running the following command from your ezpublish_legacy directory:

php bin/php/ezcache.php --ini --template

And clear Symfony's cache, from your eZ Publish's root folder:

php ezpublish/console cache:clear --env=prod
Troubleshooting
  • For configuration/connectivity problems, see the "check feed" link in the Admin Interface page listing feeds
  • If you get error messages sating: "Response received from server is not valid (unsupported format text/html)" when trying to synchronize events, a possible cause is that you might have DebugOutput enabled on the target server. There are two ways to workaround this:
    • Disable DebugOutput on the target server (for the siteaccess used for the REST calls) or
    • In wsproviders.ini.append.php configuration file, force the correct content type for your server definition:
Options[responseType]=application/json

Joao Inacio (22/10/2015 7:50 am)

Ricardo Correia (01/04/2016 2:15 pm)

Joao Inacio, Ricardo Correia


Comments

There are no comments.