Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(dev/core#3496) Missing extension leads to bootstrap error for "hook_civicrm_entityTypes" #23718

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CRM/Extension/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,12 @@ private function _setExtensionActive(CRM_Extension_Info $info, $isActive) {
* @return CRM_Extension_Info|NULL
*/
public function createInfoFromDB($key) {
$dao = new CRM_Core_DAO_Extension();
$dao->full_name = $key;
if ($dao->find(TRUE)) {
// System hasn't booted - and extension is missing. Need low-tech/no-hook SELECT to learn more about what's missing.
$select = CRM_Utils_SQL_Select::from('civicrm_extension')
->where('full_name = @key', ['key' => $key])
->select('full_name, type, name, label, file');
$dao = $select->execute();
if ($dao->fetch()) {
$info = new CRM_Extension_Info($dao->full_name, $dao->type, $dao->name, $dao->label, $dao->file);
return $info;
}
Expand Down