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.

Please be aware that your post will need to be validated by a moderator before it goes live. Sorry for the inconvenience, please be patient.

Required field *
* Required field
* Required field

Use of this website implies that you agree to the website rules and privacy policy.

Attachments

Extra checks to perform when previewing

Web Standards checking:

Posts

Post

Posted
Rating:
#59

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

Post

Posted
Rating:
#58

Composr 11 alpha4 released

This is a spacer post for a website comment topic. The content this topic relates to: Composr 11 alpha4 released