From 429da6a1529fd70914fc258a3a206dd0cc62b103 Mon Sep 17 00:00:00 2001 From: Jon goldberg Date: Fri, 18 Mar 2016 15:47:16 -0400 Subject: [PATCH] CRM-18264 - Fix potential upgrade crash when adding Getting Started dashlet --- CRM/Upgrade/Incremental/php/FourSeven.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Upgrade/Incremental/php/FourSeven.php b/CRM/Upgrade/Incremental/php/FourSeven.php index 66221d929c..3de60d0130 100644 --- a/CRM/Upgrade/Incremental/php/FourSeven.php +++ b/CRM/Upgrade/Incremental/php/FourSeven.php @@ -297,7 +297,7 @@ class CRM_Upgrade_Incremental_php_FourSeven extends CRM_Upgrade_Incremental_Base // Add default position for Getting Started Dashlet ( left column) $sql = "INSERT INTO `civicrm_dashboard_contact` (dashboard_id, contact_id, column_no, is_active) SELECT (SELECT MAX(id) FROM `civicrm_dashboard`), contact_id, 0, IF (SUM(is_active) > 0, 1, 0) -FROM `civicrm_dashboard_contact` WHERE 1 GROUP BY contact_id"; +FROM `civicrm_dashboard_contact` JOIN `civicrm_contact` WHERE civicrm_dashboard_contact.contact_id = civicrm_contact.id GROUP BY contact_id"; CRM_Core_DAO::executeQuery($sql); } return TRUE; -- 2.25.1