Open Jimmi08 opened 1 month ago
I would recommend testing core (not for using in code by default, just test) with install.php
$ret = array( 'ADMIN_DIRECTORY' => 'customadmin/', 'IMAGES_DIRECTORY' => 'customimages/', 'THEMES_DIRECTORY' => 'customthemes/', 'PLUGINS_DIRECTORY' => 'customplugins/', 'FILES_DIRECTORY' => 'customfiles/', // DEPRECATED!!! 'HANDLERS_DIRECTORY' => 'customhandlers/', 'LANGUAGES_DIRECTORY' => 'customlanguages/', 'DOCS_DIRECTORY' => 'customdocs/', 'MEDIA_DIRECTORY' => 'custommedia/', 'SYSTEM_DIRECTORY' => 'customsystem/', 'CORE_DIRECTORY' => 'customcore/', 'WEB_DIRECTORY' => 'customweb/', );
$e107_paths = $e107->defaultDirs($ret);
Then you will find that there is an issue with the site hash, I fixed it by setting:
$e107->site_path = (isset($tmp['paths']) && isset($tmp['paths']['hash'])) ? $tmp['paths']['hash'] : "[hash]"; // placeholder
- $override was not working
$e107_paths = $e107->defaultDirs($ret);
and that you have mistypo in
$this->e107->e107_dirs['SYSTEM_DIRECTORY'] = str_replace("[hash]",$this->e107->site_path,$this->e107->e107_dirs['SYSTEM_DIRECTORY']);
$this->e107->e107_dirs['CACHE_DIRECTORY'] = str_replace("[hash]",$this->e107->site_path,$this->e107->e107_dirs['CACHE_DIRECTORY']);
$this->e107->e107_dirs['SYSTEM_DIRECTORY'] = str_replace("/".$this->e107->site_path,"",$this->e107->e107_dirs['SYSTEM_DIRECTORY']);
$this->e107->e107_dirs['MEDIA_DIRECTORY'] = str_replace("/".$this->e107->site_path,"",$this->e107->e107_dirs['MEDIA_DIRECTORY']);
CACHE_DIRECTORY is not used in the config file, it should be MEDIA_DIRECTORY
The point is not to use custom folders, the point is that there are hidden issues that can backfire anytime.
Thanks
Question
Is it intentional or a bug?
in class2.php
only then are set e107 constants correctly
With the new way of config, $HANDLERS_DIRECTORY is not set and if you use a different folder, this fails.
Thanks
Expected Source
source code
Additional Context
No response