Skip to main content
Version: Next

Installation & Configuration

Bundle Installation

To install Pimcore Direct Edit for Pimcore 10.6 or higher, follow the three steps below:

  1. Install the required dependencies:
composer require pimcore/direct-edit
  1. Make sure the bundle is enabled in the config/bundles.php file. The following lines should be added:
use Pimcore\Bundle\DirectEditBundle\PimcoreDirectEditBundle;
// ...

return [
// ...
PimcoreDirectEditBundle::class => ['all' => true],
// ...
];
  1. Install the bundle:
bin/console pimcore:bundle:install PimcoreDirectEditBundle

Maintenance Commands

Add the following command to your crontab, to ensure cleanup of inactive tokens after x hours.

~/www/bin/console pimcore:direct-edit:cleanup --hours=x

JWT Key

A valid JWT key is necessary for proper Mercure communication. Currently, Pimcore Direct Edit bundle uses same key for subscriber and publisher. Use your preferred password generator to create a secure and valid JWT key, which is used by the application to encrypt JWT tokens and payloads.

Keep the jwt_key private! To learn more about JWT keys and generate a valid key, e.g. take a look at https://jwt.io.

Add generated jwt-key to the application's parameter settings (as well as to your mercure setup, see below):

parameters:
# ...
mercure:
hub:
jwt_key: 'your-256-bit-secret-min-32-chars'

Mercure Setup

The bundle uses Mercure for server-client communication during file editing. Thus, Mercure needs to be up and running to allow direct file editing.

For Mercure setup instruction, see https://mercure.rocks/docs/hub/install.

The simplest way to set up Mercure is using the docker image and set up a reverse proxy on our webserver to prevent CSP issues. For details, more aspects and some Q&A see the Mercure Setup page.

Also make sure to configure corresponding jwt keys for Pimcore as well as for Mercure.

Deployment hint:

For deployments of applications with this bundle via deployment pipelines without actual database access, the Symfony cache warming process could fail as doctrine ORM tries to determine the database version on cache warm-up to build its cache. Therefore, it is recommended to configure the database server version in the default DBAL connection like this:

doctrine:
dbal:
default_connection: default
connections:
default:
...
server_version: mariadb-10.11.0

Install Pimcore Direct Edit Client

Install Pimcore Direct Edit client on every device where you want you use the direct edit feature.

To install it, download latest and run the setup:

Compatibility

HTTPS only

Only webservers running via HTTPS are supported. This also applies to development systems. If the system is behind a proxy and the internal communication is http only, make sure to configure the trusted proxies in Symfony.

Use self-signed certificates

To allow self-signed certificates to work with the Direct Edit Client, create a file certificate-paths.txt in tmp folder of the client and add a list of paths to root certificates (one per line) that should be used for verifying the certificates.

Restart client after changing that file!

Supported Operating Systems for Desktop Client

  • Windows 10
  • MacOS

Browser Compatibility

The application has been tested with the following browsers:

  • Chrome Version 83.0.4103.106 (Official Build) (32-Bit) ✅
  • Firefox Browser 77.0.1 (64-bit) ✅
  • Microsoft Edge Version 83.0.478.54 (Official Build) (64-Bit) ✅
  • Safari 131.1 (on MacOS) ✅
  • Chrome Version 83.0.4103.116 (64 Bit) (on MacOS) ✅