CRM-18558 Selecting all on this page on search leaves count at Zero and hence Actions are unavailable

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.16, 4.6.25
    • Fix Version/s: 4.6.17
    • Component/s: CiviCRM Search
    • Labels:
    • Versioning Impact:
      Major (incompatible API change)
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds

      Description

      Haven't managed to replicate on dmaster but have on http://d46.demo.civicrm.org/civicrm

      Selecting one contact, or the checkbox for 'all on this page' does not change the 0 Selected records only. And hence users can't proceed with Actions.

      Screenshot attached.

        Attachments

          Activity

          [CRM-18558] Selecting all on this page on search leaves count at Zero and hence Actions are unavailable
          Yashodha Chaku added a comment -

          This is a duplicate of https://issues.civicrm.org/jira/browse/CRM-18521
          The regression exists only in 4.6.16

          Peter Davis added a comment -

          Thank you and apologies for making more noise. Didn't find this but looks like I should have.

          Stoob added a comment -

          Still not working as of May 23 via testing on "nightly tarball".

          Eileen McNaughton added a comment -

          re-opening at Justin's request (Agileware)

          Agileware added a comment - - edited

          See this problem again in CiviCRM 4.6.25.

          Steps to reproduce:

          1. Perform Find Contacts search
          2. Click the select all checkbox
          3. Select records count remains set "0 Selected records only"
          4. Actions menus is disabled

          Using the select "XXX all records" works fine.

          Jan 25 15:51:20  [info] $Fatal Error Details = Array
          (
              [message] => There was an error in your request
              [code] => 
          )
          
          
          Jan 25 15:51:20  [info] $backTrace = #0 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(364): CRM_Core_Error::backtrace("backTrace", TRUE)
          #1 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Mailing/Form/Optout.php(55): CRM_Core_Error::fatal("There was an error in your request")
          #2 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Form.php(455): CRM_Mailing_Form_Optout->preProcess()
          #3 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Display.php(94): CRM_Core_Form->buildForm()
          #4 /home/civicrm/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Display->perform(Object(CRM_Mailing_Form_Optout), "display")
          #5 /home/civicrm/public_html/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Mailing_Form_Optout), "display")
          #6 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Controller.php(353): HTML_QuickForm_Page->handle("display")
          #7 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(115): CRM_Core_Controller->run()
          #8 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(286): CRM_Utils_Wrapper->run("CRM_Mailing_Form_Optout", "Opt-out", NULL)
          #9 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:15))
          #10 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
          #11 /home/civicrm/public_html/sites/all/modules/civicrm/drupal/civicrm.module(482): CRM_Core_Invoke::invoke((Array:3))
          #12 [internal function](): civicrm_invoke("mailing", "optout")
          #13 /home/civicrm/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
          #14 /home/civicrm/public_html/index.php(21): menu_execute_active_handler()
          #15 {main}
          
          
          Jan 25 15:52:17  [info] $Fatal Error Details = Array
          (
              [callback] => Array
                  (
                      [0] => CRM_Core_Error
                      [1] => handle
                  )
          
              [code] => -1
              [message] => DB Error: unknown error
              [mode] => 16
              [debug_info] =>  [nativecode=1065 ** Query was empty]
              [type] => DB_Error
              [user_info] =>  [nativecode=1065 ** Query was empty]
              [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info=" [nativecode=1065 ** Query was empty]"]
          )
          
          
          Jan 25 15:52:17  [info] $backTrace = #0 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
          #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
          #2 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
          #3 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #4 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #5 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, " [nativecode=1065 ** Query was empty]", "DB_Error", TRUE)
          #6 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1065 ** Query was empty")
          #7 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
          #8 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("")
          #9 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2442): DB_common->query("")
          #10 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("")
          #11 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(321): DB_DataObject->query("")
          #12 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1181): CRM_Core_DAO->query("", TRUE)
          #13 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/BAO/PrevNextCache.php(394): CRM_Core_DAO::executeQuery(NULL, (Array:0))
          #14 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(768): CRM_Core_BAO_PrevNextCache::markSelection("civicrm search cded2660efe73b27b8f57327a8e042fb_5078", "select")
          #15 [internal function](): CRM_Contact_Page_AJAX::selectUnselectContacts()
          #16 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
          #17 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
          #18 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
          #19 /home/civicrm/public_html/sites/all/modules/civicrm/drupal/civicrm.module(482): CRM_Core_Invoke::invoke((Array:3))
          #20 [internal function](): civicrm_invoke("ajax", "markSelection")
          #21 /home/civicrm/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
          #22 /home/civicrm/public_html/index.php(21): menu_execute_active_handler()
          #23 {main}
          
          
          Jan 25 15:52:19  [info] $Fatal Error Details = Array
          (
              [callback] => Array
                  (
                      [0] => CRM_Core_Error
                      [1] => handle
                  )
          
              [code] => -1
              [message] => DB Error: unknown error
              [mode] => 16
              [debug_info] =>  [nativecode=1065 ** Query was empty]
              [type] => DB_Error
              [user_info] =>  [nativecode=1065 ** Query was empty]
              [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info=" [nativecode=1065 ** Query was empty]"]
          )
          
          
          Jan 25 15:52:19  [info] $backTrace = #0 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
          #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
          #2 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
          #3 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #4 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #5 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, " [nativecode=1065 ** Query was empty]", "DB_Error", TRUE)
          #6 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1065 ** Query was empty")
          #7 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
          #8 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("")
          #9 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2442): DB_common->query("")
          #10 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("")
          #11 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(321): DB_DataObject->query("")
          #12 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1181): CRM_Core_DAO->query("", TRUE)
          #13 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/BAO/PrevNextCache.php(394): CRM_Core_DAO::executeQuery(NULL, (Array:0))
          #14 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(768): CRM_Core_BAO_PrevNextCache::markSelection("civicrm search cded2660efe73b27b8f57327a8e042fb_5078", "select")
          #15 [internal function](): CRM_Contact_Page_AJAX::selectUnselectContacts()
          #16 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
          #17 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
          #18 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
          #19 /home/civicrm/public_html/sites/all/modules/civicrm/drupal/civicrm.module(482): CRM_Core_Invoke::invoke((Array:3))
          #20 [internal function](): civicrm_invoke("ajax", "markSelection")
          #21 /home/civicrm/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
          #22 /home/civicrm/public_html/index.php(21): menu_execute_active_handler()
          #23 {main}
          
          
          Jan 25 15:52:46  [info] $Fatal Error Details = Array
          (
              [callback] => Array
                  (
                      [0] => CRM_Core_Error
                      [1] => handle
                  )
          
              [code] => -1
              [message] => DB Error: unknown error
              [mode] => 16
              [debug_info] =>  [nativecode=1065 ** Query was empty]
              [type] => DB_Error
              [user_info] =>  [nativecode=1065 ** Query was empty]
              [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info=" [nativecode=1065 ** Query was empty]"]
          )
          
          
          Jan 25 15:52:46  [info] $backTrace = #0 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
          #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
          #2 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
          #3 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #4 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #5 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, " [nativecode=1065 ** Query was empty]", "DB_Error", TRUE)
          #6 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1065 ** Query was empty")
          #7 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
          #8 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("")
          #9 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2442): DB_common->query("")
          #10 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("")
          #11 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(321): DB_DataObject->query("")
          #12 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1181): CRM_Core_DAO->query("", TRUE)
          #13 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/BAO/PrevNextCache.php(394): CRM_Core_DAO::executeQuery(NULL, (Array:0))
          #14 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(768): CRM_Core_BAO_PrevNextCache::markSelection("civicrm search cded2660efe73b27b8f57327a8e042fb_5078", "select")
          #15 [internal function](): CRM_Contact_Page_AJAX::selectUnselectContacts()
          #16 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
          #17 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
          #18 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
          #19 /home/civicrm/public_html/sites/all/modules/civicrm/drupal/civicrm.module(482): CRM_Core_Invoke::invoke((Array:3))
          #20 [internal function](): civicrm_invoke("ajax", "markSelection")
          #21 /home/civicrm/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
          #22 /home/civicrm/public_html/index.php(21): menu_execute_active_handler()
          #23 {main}
          
          
          Jan 25 15:54:06  [info] $Fatal Error Details = Array
          (
              [callback] => Array
                  (
                      [0] => CRM_Core_Error
                      [1] => handle
                  )
          
              [code] => -1
              [message] => DB Error: unknown error
              [mode] => 16
              [debug_info] =>  [nativecode=1065 ** Query was empty]
              [type] => DB_Error
              [user_info] =>  [nativecode=1065 ** Query was empty]
              [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info=" [nativecode=1065 ** Query was empty]"]
          )
          
          
          Jan 25 15:54:06  [info] $backTrace = #0 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Error.php(235): CRM_Core_Error::backtrace("backTrace", TRUE)
          #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
          #2 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
          #3 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB.php(976): PEAR_Error->PEAR_Error("DB Error: unknown error", -1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #4 /home/civicrm/public_html/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-1, 16, (Array:2), " [nativecode=1065 ** Query was empty]")
          #5 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -1, NULL, NULL, " [nativecode=1065 ** Query was empty]", "DB_Error", TRUE)
          #6 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(895): DB_common->raiseError(-1, NULL, NULL, NULL, "1065 ** Query was empty")
          #7 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/mysql.php(328): DB_mysql->mysqlRaiseError()
          #8 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("")
          #9 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(2442): DB_common->query("")
          #10 /home/civicrm/public_html/sites/all/modules/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("")
          #11 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(321): DB_DataObject->query("")
          #12 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/DAO.php(1181): CRM_Core_DAO->query("", TRUE)
          #13 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/BAO/PrevNextCache.php(394): CRM_Core_DAO::executeQuery(NULL, (Array:0))
          #14 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Contact/Page/AJAX.php(768): CRM_Core_BAO_PrevNextCache::markSelection("civicrm search cded2660efe73b27b8f57327a8e042fb_5078", "select")
          #15 [internal function](): CRM_Contact_Page_AJAX::selectUnselectContacts()
          #16 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(278): call_user_func((Array:2))
          #17 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(86): CRM_Core_Invoke::runItem((Array:12))
          #18 /home/civicrm/public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php(54): CRM_Core_Invoke::_invoke((Array:3))
          #19 /home/civicrm/public_html/sites/all/modules/civicrm/drupal/civicrm.module(482): CRM_Core_Invoke::invoke((Array:3))
          #20 [internal function](): civicrm_invoke("ajax", "markSelection")
          #21 /home/civicrm/public_html/includes/menu.inc(527): call_user_func_array("civicrm_invoke", (Array:2))
          #22 /home/civicrm/public_html/index.php(21): menu_execute_active_handler()
          #23 {main}
          

          Agileware Reference 24811

          Agileware added a comment -

          See also CRM-19928

          Agileware added a comment - - edited

          Tested this on http://d46.demo.civicrm.org with CiviCRM 4.6.26 and cannot reproduce this problem. Works as expected.

          Agileware added a comment -

          Tested this on CiviCRM 4.6.25 as well with test data. No issues.

          I think there may be something with the data in this specific CiviCRM database causing a problem.

            People

            • Assignee:
              Yashodha Chaku
              Reporter:
              Peter Davis

              Dates

              • Created:
                Updated:
                Resolved: