Closed Guite closed 4 years ago
this may be harder than I thought. Writing files to /web
is not easily done because of user rights. This could probably be overcome with appropriate .htaccess
files, but maybe that is the wrong approach.
Just found out that Zikula bails out with error 500 in case /app/cache/formicula
folder does not exist. A nice error message would be more appropriate. Possibly consider this when moving the folder.
Thanks
if you have debug: true
or env: dev
then your error messages won't be pretty. This is why zikula ships with debug: false
and env: prod
Thats correct. I observed this error while debug: false
and env : prod
were set.
Its also the reason why I havent provided full stack trace in my first post.
In my tests the directory was automatically created during installation. https://github.com/zikula-ev/Formicula/blob/master/FormiculaModuleInstaller.php#L238 If this is not successful an error message is created.
Then I think its a corner case of the upgrade procedure. One is asked to blank the installation folder, copy latest Core & do the ZK Upgrade. Then copy module by module back. I guess on reactivating of Formicula there's no "folder availability" check. Thus cleaning cache spits the error.
Guess the upgrade function needs a small enhancement to include:
// try to create the cache directory
$this->createCacheDirectory();
And createCacheDirectory should return ok in case folder is alreardy available.
The upgrade method includes the whole install method already. Added a check for whether the directory already exists in https://github.com/zikula-ev/Formicula/commit/470ea2c90af142fd83a2509581049ca90fd7aa98
Instead
/app/cache/formicula
use/web/formicula