CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Error disabling summary fields extension
Pages: [1]

Author Topic: Error disabling summary fields extension  (Read 752 times)

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Error disabling summary fields extension
March 20, 2014, 11:56:29 am
Code: [Select]
backTrace

#0 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Error.php(149): CRM_Core_Error::backtrace()
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: no such field", -19, 16, (Array:2), "CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...")
#4 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-19, 16, (Array:2), "CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...")
#5 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -19, NULL, NULL, "CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...", "DB_Error", TRUE)
#6 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-19, NULL, NULL, NULL, "1054 ** Unknown column 'total_contributions_this_year_43' in 'NEW'")
#7 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...")
#9 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/DB/DataObject.php(2421): DB_common->query("CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...")
#10 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...")
#11 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/DAO.php(160): DB_DataObject->query("CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...")
#12 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/DAO.php(907): CRM_Core_DAO->query("CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...", FALSE)
#13 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/DAO.php(1693): CRM_Core_DAO::executeQuery("CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON ci...", (Array:0), TRUE, NULL, FALSE, FALSE)
#14 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/DAO.php(1555): CRM_Core_DAO::createTriggers((Array:405))
#15 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Invoke.php(508): CRM_Core_DAO::triggerRebuild()
#16 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Extension/Manager.php(308): CRM_Core_Invoke::rebuildMenuAndCaches(TRUE)
#17 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Admin/Form/Extensions.php(198): CRM_Extension_Manager->disable((Array:1))
#18 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Form.php(261): CRM_Admin_Form_Extensions->postProcess()
#19 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/StateMachine.php(160): CRM_Core_Form->mainProcess()
#20 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Admin_Form_Extensions), "next", "Next")
#21 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Admin_Form_Extensions), "next")
#22 /home/xxxx/public_html/beta/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Admin_Form_Extensions), "next")
#23 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Controller.php(345): HTML_QuickForm_Page->handle("next")
#24 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(381): CRM_Core_Controller->run()
#25 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Page/Basic.php(178): CRM_Core_Page_Basic->edit(64, NULL)
#26 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Admin/Page/Extensions.php(127): CRM_Core_Page_Basic->run()
#27 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Invoke.php(323): CRM_Admin_Page_Extensions->run((Array:3), NULL)
#28 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Invoke.php(72): CRM_Core_Invoke::runItem((Array:13))
#29 /home/xxxx/public_html/beta/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
#30 /home/xxxx/public_html/beta/sites/all/modules/civicrm/drupal/civicrm.module(456): CRM_Core_Invoke::invoke((Array:3))
#31 [internal function](): civicrm_invoke("admin", "extensions")
#32 /home/xxxx/public_html/beta/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
#33 /home/xxxx/public_html/beta/index.php(21): menu_execute_active_handler()
#34 {main}
Sorry but we are not able to provide this at the moment.
DB Error: no such field
Error Details
Database Error Code: Unknown column 'total_contributions_this_year_43' in 'NEW', 1054
Additional Details:
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON civicrm_value_summary_fields_8 FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_summary_fields_8 (id, entity_id, total_contributions_this_year_43, total_deductible_contributions_t_44, total_contributions_last_year_45, total_deductible_contributions_l_46, total_contributions_year_before__47, total_deductible_contributions_y_48, amount_of_last_contribution_49, date_of_last_contribution_50, date_of_first_contribution_51, largest_contribution_52, count_of_contributions_53, average_annual_calendar_year_con_54, date_of_last_membership_payment_55, amount_of_last_membership_paymen_56, name_of_the_last_attended_event_57, date_of_the_last_attended_event_58, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.total_contributions_this_year_43, NEW.total_deductible_contributions_t_44, NEW.total_contributions_last_year_45, NEW.total_deductible_contributions_l_46, NEW.total_contributions_year_before__47, NEW.total_deductible_contributions_y_48, NEW.amount_of_last_contribution_49, NEW.date_of_last_contribution_50, NEW.date_of_first_contribution_51, NEW.largest_contribution_52, NEW.count_of_contributions_53, NEW.average_annual_calendar_year_con_54, NEW.date_of_last_membership_payment_55, NEW.amount_of_last_membership_paymen_56, NEW.name_of_the_last_attended_event_57, NEW.date_of_the_last_attended_event_58, CONNECTION_ID(), @civicrm_user_id, 'insert');END IF;

UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.entity_id;
 END [nativecode=1054 ** Unknown column 'total_contributions_this_year_43' in 'NEW']
    [type] => DB_Error
    [user_info] => CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON civicrm_value_summary_fields_8 FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_summary_fields_8 (id, entity_id, total_contributions_this_year_43, total_deductible_contributions_t_44, total_contributions_last_year_45, total_deductible_contributions_l_46, total_contributions_year_before__47, total_deductible_contributions_y_48, amount_of_last_contribution_49, date_of_last_contribution_50, date_of_first_contribution_51, largest_contribution_52, count_of_contributions_53, average_annual_calendar_year_con_54, date_of_last_membership_payment_55, amount_of_last_membership_paymen_56, name_of_the_last_attended_event_57, date_of_the_last_attended_event_58, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.total_contributions_this_year_43, NEW.total_deductible_contributions_t_44, NEW.total_contributions_last_year_45, NEW.total_deductible_contributions_l_46, NEW.total_contributions_year_before__47, NEW.total_deductible_contributions_y_48, NEW.amount_of_last_contribution_49, NEW.date_of_last_contribution_50, NEW.date_of_first_contribution_51, NEW.largest_contribution_52, NEW.count_of_contributions_53, NEW.average_annual_calendar_year_con_54, NEW.date_of_last_membership_payment_55, NEW.amount_of_last_membership_paymen_56, NEW.name_of_the_last_attended_event_57, NEW.date_of_the_last_attended_event_58, CONNECTION_ID(), @civicrm_user_id, 'insert');END IF;

UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.entity_id;
 END [nativecode=1054 ** Unknown column 'total_contributions_this_year_43' in 'NEW']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="CREATE TRIGGER civicrm_value_summary_fields_8_after_insert after insert ON civicrm_value_summary_fields_8 FOR EACH ROW BEGIN  IF ( @civicrm_disable_logging IS NULL OR @civicrm_disable_logging = 0 ) THEN INSERT INTO log_civicrm_value_summary_fields_8 (id, entity_id, total_contributions_this_year_43, total_deductible_contributions_t_44, total_contributions_last_year_45, total_deductible_contributions_l_46, total_contributions_year_before__47, total_deductible_contributions_y_48, amount_of_last_contribution_49, date_of_last_contribution_50, date_of_first_contribution_51, largest_contribution_52, count_of_contributions_53, average_annual_calendar_year_con_54, date_of_last_membership_payment_55, amount_of_last_membership_paymen_56, name_of_the_last_attended_event_57, date_of_the_last_attended_event_58, log_conn_id, log_user_id, log_action) VALUES ( NEW.id, NEW.entity_id, NEW.total_contributions_this_year_43, NEW.total_deductible_contributions_t_44, NEW.total_contributions_last_year_45, NEW.total_deductible_contributions_l_46, NEW.total_contributions_year_before__47, NEW.total_deductible_contributions_y_48, NEW.amount_of_last_contribution_49, NEW.date_of_last_contribution_50, NEW.date_of_first_contribution_51, NEW.largest_contribution_52, NEW.count_of_contributions_53, NEW.average_annual_calendar_year_con_54, NEW.date_of_last_membership_payment_55, NEW.amount_of_last_membership_paymen_56, NEW.name_of_the_last_attended_event_57, NEW.date_of_the_last_attended_event_58, CONNECTION_ID(), @civicrm_user_id, 'insert');END IF;

UPDATE civicrm_contact SET modified_date = CURRENT_TIMESTAMP WHERE id = NEW.entity_id;
 END [nativecode=1054 ** Unknown column 'total_contributions_this_year_43' in 'NEW']"]
)
Return to home page.

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Error disabling summary fields extension
March 20, 2014, 02:25:27 pm
I haven't used the extension, but one theory -- the extension appears to define an 'on-disable' hook which deletes various custom fields and tables, so there must be some in-memory data structure which has the old list of custom fields (or old list of SQL columns).

1) Are you using multi-lingual, detailed revision logging, or some other feature that builds on the trigger system?

2) Does the extension appear as 'disabled' in the extension manager?

3) Try clearing the cache by navigating to "/civicrm/clearcache?triggerRebuild=1" .

4) If the extension appears as disabled and the clear-cache succeeds, then the error should be resolved.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Error disabling summary fields extension
March 20, 2014, 07:16:15 pm
Quote
I haven't used the extension, but one theory -- the extension appears to define an 'on-disable' hook which deletes various custom fields and tables, so there must be some in-memory data structure which has the old list of custom fields (or old list of SQL columns).

1) Are you using multi-lingual, detailed revision logging, or some other feature that builds on the trigger system?

2) Does the extension appear as 'disabled' in the extension manager?

3) Try clearing the cache by navigating to "/civicrm/clearcache?triggerRebuild=1" .

4) If the extension appears as disabled and the clear-cache succeeds, then the error should be resolved.

1) - using logging
2) when disabled, caused yet another backtrace.  Even worse, it left some orphaned custom value tables (ie. civicrm_value_xxx)
3) yes, i tried, not a caching issue
4) I removed and restored the database.

Perhaps it was not tested with logging?  Very cool module though - really like the idea of calculated fields.  This was a nice to have at this point.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Error disabling summary fields extension

This forum was archived on 2017-11-26.