civicrm / org.civicrm.volunteer

CiviVolunteer extension.
40 stars 64 forks source link

Installation fails on CiviCRM 5.78.4 #619

Open somnolentsurfer opened 2 weeks ago

somnolentsurfer commented 2 weeks ago

Installation of CiviVolunteer is failing on a fresh install of CiviCRM 5.78.4 on WordPress 6.6.2. No other extensions installed apart from The Island theme.

The UI displays the error 'Sorry, due to an error, we are unable to fulfill your request at the moment. You may want to contact your administrator or service provider with more details about what action you were performing when this occurred.'

ConfigAndLog contains the following:

2024-11-05 16:15:46+0000  [error] 
$Fatal Error Details = array:3 [
  "message" => "DB Error: syntax error"
  "code" => null
  "exception" => CRM_Core_Exception {#5026
    #message: "DB Error: syntax error"
    #code: -2
    #file: "/Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/api/api.php"
    #line: 138
    #cause: null
    -_trace: null
    -errorData: array:8 [
      "error_code" => -2
      "sql" => ")  ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
      "debug_info" => """
        CREATE TABLE civicrm_value_civivolunteer_\n
        :  Undefined array key "civicrm_custom_group" in  on line \n
         (\n
                `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Default MySQL primary key',\n
                `entity_id` int unsigned NOT NULL COMMENT 'Table that this extends',\n
                PRIMARY KEY ( id ),\n
                UNIQUE INDEX unique_entity_id (  entity_id ),\n
                CONSTRAINT FK_civicrm_value_civivolunteer_\n
        :  _75ea6eb974bf0dce FOREIGN KEY ( `entity_id` ) REFERENCES civicrm_activity ( id ) ON DELETE CASCADE\n
        )  ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':  Undefined array key "civicrm_custom_group" in  on line \n
         (\n
                `id` int u' at line 2]
        """
      "entity" => "Extension"
      "action" => "install"
      "is_error" => 1
      "error_message" => "DB Error: syntax error"
      "debug_information" => ")  ENGINE=InnoDB DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
    ]
    trace: {
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/api/api.php:138 {
        civicrm_api3(string $entity, string $action, array $params = [])
        › if (is_array($result) && !empty($result['is_error'])) {
        ›   throw new CRM_Core_Exception($result['error_message'], $result['error_code'] ?? 'undefined', $result);
        › }
      }
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Admin/Form/Extensions.php:187 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:646 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/StateMachine.php:144 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Next.php:43 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:356 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php:364 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Page/Basic.php:170 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Admin/Page/Extensions.php:110 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:338 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:74 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm.php:1231 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-includes/class-wp-hook.php:324 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-includes/class-wp-hook.php:348 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-includes/plugin.php:517 { …}
      /Applications/MAMP/htdocs/hcf_test/wp-admin/admin.php:259 { …}
    }
  }
]

2024-11-05 16:15:46+0000  [debug] $backTrace = #0 /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
#2 /Applications/MAMP/htdocs/hcf_test/wp-content/plugins/civicrm/civicrm.php(1231): CRM_Core_Invoke::invoke((Array:3))
#3 /Applications/MAMP/htdocs/hcf_test/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke("")
#4 /Applications/MAMP/htdocs/hcf_test/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters("", (Array:1))
#5 /Applications/MAMP/htdocs/hcf_test/wp-includes/plugin.php(517): WP_Hook->do_action((Array:1))
#6 /Applications/MAMP/htdocs/hcf_test/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
#7 {main}

Strangely, CiviCRM then does report that the extension was installed successfully, but attempting to navigate to either 'New Volunteer Project' or 'Manage Volunteer Projects' gets a blank screen, the second with an endlessly rotating CiviCRM logo. It also then seems to break some elements of the theme. And I see frequent red error notifications saying things like 'Error relationship_type_id is not a valid integer'.

Attempting to disable CiviVolunteer then fails in the same manner as installations and dumps the attached in ConfigAndLog which is too long to include here. CiviCRM.1.c0527c82c0207e524b3752aa.log