Installation & Configuration
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
bin/console doctrine:schema:update to apply the bundle's database schemes.
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
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 a detailed setup instruction, see https://mercure.rocks/docs/hub/install.
Configuration in a nutshell
Apache Reverse Proxy
http_proxy in apache and add the following reverse proxy in your apache config:
ProxyPass /hub/ http://localhost:3000/ ProxyPassReverse /hub/ http://localhost:3000/
Use your preferred password generator to create a secure 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, take a look at https://jwt.io.
Add generated jwt-key to the applications parameter settings:
parameters: # ... mercure: hub: jwt_key: 'your-256-bit-secret'
The bundle ships with an executable of Mercure (of course you also could use another binary). To run Mercure, use following command:
./vendor/pimcore/direct-edit/bin/mercure --jwt-key=your-256-bit-secret --addr=':3000' --debug --allow-anonymous --cors-allowed-origins='*' -f --debug
The hub must be permanently up and running. You can use following crontab example to ensure that:
*/5 * * * * /usr/bin/flock -n /tmp/mercure.lockfile /<system-path>/mercure --jwt-key=your-256-bit-secret --addr=':3000' --debug --allow-anonymous --cors-allowed-origins='*' -f
Check if Mercure is running
To see if Mercure is up and available, call
This request should return the text
Missing "topic" parameter.
curl https://your-app-domain.com/hub/.well-known/mercurefrom the command line of the server to ensure that the URL is also accessible by the server itself.
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:
Supported Operating Systems for Desktop Client
- Windows 10
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) ✅