This chapter explains how to install/enable the Online Editor v.5.x extension for eZ Publish.
Online Editor already comes installed by default with the official eZ Publish 5.x packages.
If for some reason you required to disabled ezoe you can use the following steps to re-enable it.
Before doing anything else, please verify that the requirements are met.
To enable the OE for all of your siteaccesses, log in to your eZ Publish administration interface, click on the "Setup" tab, and then click "Extensions" on the left.
The "Setup" tab in the administration interface.
You will see the list of available extensions.
The list of available extensions.
Select the "ezoe" item, click the "Apply changes" button to enable it, and then click on the "Regenerate autoload arrays for extensions" for its functions to be loaded.
Alternatively, you can also edit the "site.ini.append.php" file located in the "<eZ_Publish_root>/ezpublish_legacy/settings/override" directory. Add the following line under the "[ExtensionSettings]" section:
ActiveExtensions[]=ezoe
Create the file and/or the section if they do not exist.
To enable the OE for only a single siteaccess called "example", open the "site.ini.append.php" file located in the "<eZ_Publish_root>/ezpublish_legacy/settings/siteaccess/example" directory. Add the following line under the "[ExtensionSettings]" section:
ActiveAccessExtensions[]=ezoe
Create the file and/or the section if they do not exist.
In eZ Publish, images are usually stored as Image objects. The OE allows you to embed various objects into XML fields. The OE uses the identifiers of the image classes to determine whether the inserted object is an image or not. This is controlled by the "ImageClassIdentifiers" setting located in the "[MediaClassSettings]" section of the "extension/ezoe/settings/site.ini.append.php" configuration file. (Note that the "ImageClassID" setting located at the same place is deprecated and should not be used.)
To check the identifier of your Image class, log in to your eZ Publish administration interface, access the "Setup" tab, and then click "Classes" on the left.
The "Classes" under the "Setup" tab in the administration interface.
You will see the list of class groups.
The list of class groups.
Select the "Media" group and find the image class. The default identifier of this class is "image" in a standard eZ Publish installation.
The list of classes inside the "Media" group.
If there are different/additional image classes, you'll have to extend the "ImageClassIdentifiers[]" configuration array. For example, if you have added 2 new classes that you're using for images and their identifiers are "screenshot" and "photo", add the following lines into the "<eZ_Publish_root>/ezpublish_legacy/settings/override/site.ini.append.php" configuration file:
[MediaClassSettings] ImageClassIdentifiers[]=image ImageClassIdentifiers[]=photo
There are some ".css" and ".js" files that are needed for the Online Editor to work correctly. In order to speed up the loading process, a specific packing mechanism is introduced, which collects CSS instructions from multiple files and stores the result in a temporary ".css" file located in the "<eZ_Publish_root>/ezpublish_legacy/var/<name_of_siteaccess>/cache/public/" directory. In the same way, JavaScript instructions collected from multiple files are stored in a temporary ".js" file. (Note that the path to the cache directory may differ depending on what is specified in the "CacheDir" configuration setting.) Because of this, you need to make sure that the following rewrite rule exists in your Apache configuration file:
RewriteRule ^/var/([^/]+/)?cache/public/.* - [L]
In order to use the Online Editor 5.0.x, users must be granted access to the "ezoe" module. For example, let's say that you have a user group called "Publicists" and a role called "Writer" assigned to it. If you want the users in that group to be allowed to access the OE interface, you will most likely need to edit the "Writer" role and add a new policy there. The following text reveals how this can be done.
All users and user groups that the "Writer" role is assigned to will now have full access to the OE functionality.
It is also possible to limit access to some of the OE features. In the example above, you can click the "Grant access to one function" button (instead of "Grant access to all functions") in the step 3. Then, select the desired function (refer to the table below) and click the "Grant full access" button in order to add the new policy. Note that you need to add a policy to grant access for each additional function.
The following table reveals the list of policy functions that are supported by the "ezoe" module.
Function | Description |
---|---|
editor |
Generic switch for accessing the Online Editor interface. Does not allow you to work with images and related objects, unless access is also granted to the "relations" function. |
relations |
Controls access to the "Image" and "Object" buttons in the Online Editor and allows you to work with related objects. The "editor" function is required for this to work. |
browse |
Controls whether it is possible to browse the content tree when managing related objects/images from within the OE interface. The "editor" and "relations" functions are required for this to work. |
search |
Controls whether it is possible to search in the content tree when managing related objects/images from within the OE interface. The "editor" and "relations" functions are required for this to work. |
To do this, log in to your eZ Publish administration interface, select the "Setup" tab, and then click the "Clear all caches" button.
The "Setup" tab in the administration interface.
You can also use the developer toolbar (if enabled) located on the right hand side. Simply select "All caches" from the drop-down list and click the "Clear" button.
The developer toolbar allows to clear caches.
The other way to clear all caches is to run the "ezcache.php" script. The following example shows how this can be done.
Run the ezcache.php legacy script executing the following shell command from the <eZ Publish root>/ezpublish_legacy/ folder (only required for eZ Publish 5.1 and lower versions):
php bin/php/ezcache.php --clear-all --purge
Run Symfony's cache:clear from the console, by executing the following shell command from your eZ Publish root folder:
php ezpublish/console cache:clear --env=prod
Purging (for ezcache.php) ensures that the caches are physically removed. When the "--purge" parameter is not specified, the caches will be expired but not removed (refer to this page for more information).
Sometimes the script is unable to clear all cache files because of restrictive file/directory permission settings. Make sure that all cache files have been cleared by inspecting the contents of the various cache subdirectories within the "var" directory (typically the "<eZ_Publish_root>/ezpublish_legacy/var/cache/" and "<eZ_Publish_root>/ezpublish_legacy/var/<name_of_siteaccess>/cache/" directories). If there are any cache files left, you need to remove them manually.
Browsers usually cache visited pages in a folder somewhere. The next time the same pages are visited, they are loaded faster because some of the information already exists on the local storage device. This is a wonderful feature, but sometimes it may cause problems when you're upgrading the Online Editor. If you already have the OE installed and you're upgrading it then you will have to clear the browser's cache. The following text reveals how to clear the caches on different types of browsers.
Note that there are some menu differences between the versions for different operating systems. In Windows ("Tools" -> "Options"), Linux ("Edit" -> "Preferences"), and Mac ("Firefox" -> "Preferences").