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

Change from no auto-renew to auto-renew for existing membership type, dB Syntax error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.3.4
    • Fix Version/s: 4.3.5
    • Component/s: CiviMember
    • Labels:
      None

      Description

      Reproduced on demo site.

      http://drupal.demo.civicrm.org/civicrm/admin/member/membershipType/add?action=update&id=2&reset=1

      Change to "Give option, but not required", save. The option does save, but there is an syntax error.

      view syntax error:
      #0 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/Error.php(148): CRM_Core_Error::backtrace()
      #1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
      #2 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
      #3 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: syntax error", -2, 16, (Array:2), "UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...")
      #4 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/PEAR.php(564): DB_Error->DB_Error(-2, 16, (Array:2), "UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...")
      #5 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/DB/common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...", "DB_Error", TRUE)
      #6 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/DB/mysql.php(898): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
      #7 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
      #8 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/DB/common.php(1216): DB_mysql->simpleQuery("UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...")
      #9 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/DB/DataObject.php(2421): DB_common->query("UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...")
      #10 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/DB/DataObject.php(1613): DB_DataObject->_query("UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...")
      #11 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/DAO.php(155): DB_DataObject->query("UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...")
      #12 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/DAO.php(917): CRM_Core_DAO->query("UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...", TRUE)
      #13 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Member/BAO/MembershipType.php(776): CRM_Core_DAO::executeQuery("UPDATE `civicrm_price_field_value` cpfv\nINNER JOIN civicrm_price_field cpf o...", (Array:5))
      #14 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Member/BAO/MembershipType.php(122): CRM_Member_BAO_MembershipType::updateAllPriceFieldValue("2", (Array:17))
      #15 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Member/Form/MembershipType.php(429): CRM_Member_BAO_MembershipType::add((Array:17), (Array:1))
      #16 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/Form.php(246): CRM_Member_Form_MembershipType->postProcess()
      #17 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/QuickForm/Action/Upload.php(151): CRM_Core_Form->mainProcess()
      #18 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/QuickForm/Action/Upload.php(128): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Member_Form_MembershipType), "upload")
      #19 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Member_Form_MembershipType), "upload")
      #20 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Member_Form_MembershipType), "upload")
      #21 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/Controller.php(316): HTML_QuickForm_Page->handle("upload")
      #22 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Utils/Wrapper.php(117): CRM_Core_Controller->run()
      #23 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/Invoke.php(266): CRM_Utils_Wrapper->run("CRM_Member_Form_MembershipType", "Membership Types", NULL)
      #24 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/Invoke.php(70): CRM_Core_Invoke::runItem((Array:13))
      #25 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:5))
      #26 /var/www/drupal7.civicrm.org/svn/civicrmdemo43/drupal/civicrm.module(436): CRM_Core_Invoke::invoke((Array:5))
      #27 [internal function](): civicrm_invoke("admin", "member", "membershipType", "add")
      #28 /var/www/drupal7.civicrm.org/public/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:4))
      #29 /var/www/drupal7.civicrm.org/public/index.php(21): menu_execute_active_handler()
      #30

      {main}

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              stoob Stoob
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: