Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15940

Report gives white screen rather than sensible error if report instance is invalid

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.11
    • Fix Version/s: 4.6
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      e.g go to this url

      http://d45.demo.civicrm.org/civicrm/report/instance/675?reset=1

      Something like the below would work better - although it might be good to offer them a useful url - e.g create report from template url

      diff --git a/CRM/Report/Page/Instance.php b/CRM/Report/Page/Instance.php
      index f9d4fe6..f7e4815 100644
      — a/CRM/Report/Page/Instance.php
      +++ b/CRM/Report/Page/Instance.php
      @@ -71,8 +71,7 @@ class CRM_Report_Page_Instance extends CRM_Core_Page {
      else {
      $templateInfo = CRM_Core_OptionGroup::getRowValues('report_template', "{$optionVal}", 'value');
      if (empty($templateInfo))

      { - CRM_Core_Session::setStatus(ts('Could not find template for the instance.'), ts('Template Not Found'), 'error'); - return; + CRM_Core_Error::statusBounce('You have tried to access a report that does not exist.'); }

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: