Open discordier opened 7 years ago
If the system/config/pathconfig.php is missing, synCto popups screw up big time, as they then add their whole path as base tag.
system/config/pathconfig.php
Solution is to run the following code right before the require($dir . '/system/initialize.php');:
require($dir . '/system/initialize.php');
if (!is_file($dir . '/system/config/pathconfig.php')) { \File::putContent( $dir . '/system/config/pathconfig.php', '<?php' . "\n\n// Relative path to the installation\nreturn " . var_export(preg_replace('/\/system\/modules\/syncCto\/SyncCtoPopup[a-z]+\.php$/i', '', (PHP_SAPI == 'cgi' || PHP_SAPI == 'isapi' || PHP_SAPI == 'cgi-fcgi' || PHP_SAPI == 'fpm-fcgi') && ($_SERVER['ORIG_PATH_INFO'] ? $_SERVER['ORIG_PATH_INFO'] : $_SERVER['PATH_INFO']) ? ($_SERVER['ORIG_PATH_INFO'] ? $_SERVER['ORIG_PATH_INFO'] : $_SERVER['PATH_INFO']) : ($_SERVER['ORIG_SCRIPT_NAME'] ? $_SERVER['ORIG_SCRIPT_NAME'] : $_SERVER['SCRIPT_NAME']))), true) . ";\n" ); }
@stefanheimes BUMP!
If the
system/config/pathconfig.php
is missing, synCto popups screw up big time, as they then add their whole path as base tag.Solution is to run the following code right before the
require($dir . '/system/initialize.php');
: