Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.1.5
-
Fix Version/s: 3.1.6
-
Component/s: CiviReport
-
Labels:None
Description
When I run the LYBUNT Report, the Preview screen crashes with a DB Error 1242, which reads as follows:
Sorry. A non-recoverable error has occurred.
DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
Database Error Code: Subquery returns more than 1 row, 1242
The only option is to return to the home page. The SQL Statement in error appears below:
[debug_info] =>
SELECT SQL_CALC_FOUND_ROWS contact_civireport.id as cid
FROM civicrm_contribution contribution_civireport
INNER JOIN civicrm_contact contact_civireport
ON contact_civireport.id = contribution_civireport.contact_id
LEFT JOIN civicrm_email email_civireport
ON contact_civireport.id = email_civireport.contact_id AND
email_civireport.is_primary = 1
LEFT JOIN civicrm_phone phone_civireport
ON contact_civireport.id = phone_civireport.contact_id AND
phone_civireport.is_primary = 1 WHERE contribution_civireport.is_test = 0 AND contribution_civireport.contact_id NOT IN
((SELECT distinct contri.contact_id FROM civicrm_contribution contri
WHERE YEAR(contri.receive_date) = 2009 AND contri.is_test = 0) ) AND contribution_civireport.contact_id IN ((SELECT distinct contri.contact_id FROM civicrm_contribution contri
WHERE YEAR(contri.receive_date) = (2009-1) AND contri.is_test = 0) ) AND ( contribution_civireport.contribution_status_id IN (1) ) GROUP BY contact_civireport.id LIMIT 0, 50
--> [nativecode=1242 ** Subquery returns more than 1 row]