Reply to topic 'Composr 11 alpha4 released' (under PDStig's post)
You have 30 minutes to complete this form before the CAPTCHA will expire.
You are not logged in. If you log in you can receive point credit, notifications, and edit control, for your submission.
Posts
If you had a previous upgrade extract files belonging to addons you uninstalled, do the following when upgrading to 11.alpha4:
0. Back everything up.
1. First, rename data_custom/execute_temp.php.bundle to data_custom/execute_temp.php and run this code in data_custom/execute_temp.php to clear out addon registry hooks of addons you do not have installed (according to your database):
Code
$hooks = [];
$dir = get_file_base() . '/sources/hooks/systems/addon_registry';
$dh = @opendir($dir);
if ($dh !== false) {
while (($file = readdir($dh)) !== false) {
if ((substr($file, -4) == '.php') && (preg_match('#^[\w\-]*$#', substr($file, 0, strlen($file) - 4)) != 0)) {
$hooks[substr($file, 0, strlen($file) - 4)] = 'sources';
}
}
closedir($dh);
}
foreach ($hooks as $hook => $path) {
$test = $GLOBALS['SITE_DB']->query_select_value_if_there('addons', 'addon_name', ['addon_name' => $hook]);
if ($test === null) {
@unlink(get_file_base() . '/' . $path . '/hooks/systems/addon_registry/' . $hook . '.php');
}
}
2. In upgrader.php (whether you go there directly or from the Admin Zone), run the file / integrity scan first before any other step. Remove all files belonging to addons you do not have installed.
3. Proceed upgrading as you normally would.
4. rename data_custom/execute_temp.php back to execute_temp.php.bundle
Last edit: by PDStig