Skip to content
  • totten's avatar
    financial#84 - Simplify upgrader. Fix "wp-demo" upgrade scenario. · 8d61bab3
    totten authored
    Steps to reproduce
    ------------------
    
    * Create a site based on `wp-demo` with Civi 5.21
    * Make a DB snapshot
    * Update code to 5.24
    * In the web UI, run the DB upgrade
        * Note: It's important to use the web UI. The problem does not reproduce in CLI.
    
    Before
    ------
    
    The upgrader freezes on "Upgrade DB to 5.24.alpha1". The `CiviCRM.log` includes:
    
    ```
    Apr 03 14:41:50  [info] Running task: Upgrade DB to 5.24.alpha1: SQL
    
    Apr 03 14:41:55  [info] Running task: Install sequential creditnote extension
    
    Apr 03 14:42:14  [info] $CRM_Queue_ErrorPolicy_reportError = Array
    (
        [is_error] => 1
        [is_continue] => 0
        [exception] => Error 1: Uncaught Error: Class 'CRM_Volunteer_Permission' not found in /home/me/bknix/build/wpmaster/web/wp-content/plugins/civicrm/civicrm/tools/extensions/civivolunteer/volunteer.php:497
    Stack trace:
    0 /home/me/bknix/build/wpmaster/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook.php(286): volunteer_civicrm_permission(Array)
    1 /home/me/bknix/build/wpmaster/web/wp-content/plugins/civicrm/civicrm/CRM/Utils/Hook/WordPress.php(139): CRM_Utils_Hook->runHooks(Array, 'civicrm_permiss...', 1, Array, NULL, NULL, NULL, NULL, NULL)
    2 /home/me/bknix/build/wpmaster/web/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(86): CRM_Utils_Hook_WordPress->invokeViaUF(1, Array, NULL, NULL, NULL, NULL, NULL, 'civicrm_permiss...')
    3 /home/me/bknix/build/wpmaster/web/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(184): Civi\Core\CiviEventDispatcher::delegateToUF(Object(Civi\Core\Event\GenericHookEvent), 'hook_civicrm_p
        [last_task_title] => Install sequential creditnote extension
    )
    ```
    
    After
    -----
    
    The upgrade completes. After installation, the `sequentialcreditnotes` extension is active.
    8d61bab3