Installation & Configuration
Bundle Installation
To install Pimcore Direct Edit bundle use following commands:
composer require pimcore/direct-edit
./bin/console pimcore:bundle:enable PimcoreDirectEditBundle
./bin/console pimcore:bundle:install PimcoreDirectEditBundle
Update Database
Run bin/console doctrine:schema:update --force --em=pimcore_direct_edit
to apply the bundle's database schemes.
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'
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. More aspects and Q&A also can be found at the Mercure Setup page.
Also make sure to configure corresponding jwt keys for Pimcore as well as for Mercure.
Configure Mercure URLs (optional)
It is possible to configure URLs for accessing Mercure server-side (for updating state information within application services) and client-side (for getting updates in Pimcore admin interface) via symfony configuration tree as follows:
pimcore_direct_edit:
mercure_settings:
# URL of mercure accessible for client. If not set, default will be set to 'http(s)://<PIMCORE_HOST>/hub/.well-known/mercure'. Is is possible to use '<PIMCORE_SCHEMA_HOST>' as placeholder for current schema and host.
client_side_url: null
# URL of mercure accessible for server. If not set, default will be set to 'http(s)://<PIMCORE_HOST>/hub/.well-known/mercure'.
server_side_url: null
You need to configure the full URL including protocol, port and path to Mercure here. For client side url it is also possible
to use <PIMCORE_SCHEMA_HOST>
for current schema and host of client. If these settings are not set,
URLs will be generated based on Pimcore host and default paths.
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.
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) ✅