Details
-
Bug
-
Resolution: Fixed
-
Critical
-
5.4.12, 1.7.8, 1.13.4
-
None
-
php-fpm 5.6
nginx nginx/1.10.2
mysql 5.5
centos 6
Description
I just updated ez Publish using composer and a critical error appeared
The error is on like 30 of StashPass.php
Missing 'caches'
History ...
There has been a long time bug with EE where the config.yml does not allow overriding settings from any ezpublish.yml or ezpublish_*.yml stash.caches.default values. it only APPENDS and basically does nothing.
The documentation is either completely false or incomplete on how to configure ONLY memcache on production.
Previously, I did many many tests proving that no matter what, config.yml's stash.caches.driver -FileSystem is always used. So I comment out the config.yml stash.caches and this allows ezpublish_prod.yml to actually set the stash.caches.default values.
config.yml
- Comment out stash config becuase ezpublish*.yml never overwrites, only appends and then is NOT used.
#stash: - caches:
- default:
- drivers:
- - FileSystem
- inMemory: true
- registerDoctrineAdapter: false
ezpublish_prod.yml
- Memcache Driver for dev stash
stash:
caches:
default:
drivers: [ Memcache ]
inMemory: true
registerDoctrineAdapter: false
Memcache:
retry_timeout: 1
servers:
- {server: %memcached_host%, port: %memcached_port%}
This used to work fine ...
However this recent compose update broke this fix.
Several hours of testing shows that config.yml must now ALWAYS have a stash.caches.default.driver -FileSystem or eZ throws an error about missing 'caches' in the config.
However that means NO OTHER stash driver can be used any more. as it either APPENDS to the end and is never used OR it will just error in StashPass.php
1. GOAL: use ONLY stash.caches.default.driver -Memcache for ezpublish_prod.yml
2. GOAL: use stash.caches.default.driver -FileSystem for NOT PROD configs
Ideally the ezpublish*.yml should overrwrite the config.yml values OR work standalone again. Please fix this!
For now I had to hack the StashPass.php
- DJS HACK to fix missing 'caches' bug while allowing ezpublish_prod.yml to set values (not config.yml append)
if(array_key_exists('caches',$config)) { foreach ($config['caches'] as $name => $configuration) { if (in_array('Redis', $configuration['drivers'], true)) { $this->configureRedis($container, $igbinary, $lzf); } } }
- DJS end hack