progressivetech / net.ourpowerbase.sumfields

The Summary Fields extension creates read-only custom data fields that extend Contact and are automatically populated with up-to-date totals such as total lifetime contributions, last contribution amount, last attended event, etc.
Other
8 stars 29 forks source link

Your configuration may be corrupted. Please disable and renable this extension. #96

Open yurg opened 2 years ago

yurg commented 2 years ago

Hello, what would be a correct way of repair Summary Fields extension? I can see a list of fields on wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fcustom%2Fgroup%2Ffield&reset=1&action=browse&gid=24 page and there are 25 fields listed. But there are only two fields in civicrm_value_summary_fields_24 table (where 24 is fields group): ID and Entity ID

This is what I've tried so far:

* Delete custom fields one by one via GUI - no luck, system just hangs. 

*  Change settings on wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fadmin%2Fsetting%2Fsumfields page.

`"Your configuration may be corrupted. Please disable and renable this extension." and "There was an error applying your changes." `(right, there is a typo in error message at "renable")

* delete via API  brings (obviously, there are only 2 columns in the DB): 

"code": -4, "error_message": "DB Error: not found", "mode": 16, "debug_info": " ALTER TABLE civicrm_value_summary_fields_24 DROP COLUMN total_lifetime_soft_credits_69 [nativecode=1091 Can't DROP 'total_lifetime_soft_credits_69'; check that column/key exists]", "type": "DB_Error", "user_info": " ALTER TABLE civicrm_value_summary_fields_24 DROP COLUMN total_lifetime_soft_credits_69 [nativecode=1091 Can't DROP 'total_lifetime_soft_credits_69'; check that column/key exists]", "to_string": "[db_error: message=\"DB Error: not found\" code=-4 mode=callback callback=CRM_Utils_REST::fatal prefix=\"\" info=\" ALTER TABLE civicrm_value_summary_fields_24 DROP COLUMN total_lifetime_soft_credits_69 [nativecode=1091 ** Can't DROP 'total_lifetime_soft_credits_69'; check that column/key exists]\"]", "is_error": 1 }"



* Tried turning it off and on again via  disable &uninstall:  no dice, it just said "Error creating fields: it seems it's already there" or something like that. 

So I wonder: is it safe to delete all custom fields from **civicrm_custom_field** and a custom group from **civicrm_custom_groups**, 
this looks like the last resort. Please advise, thank you.
jmcclelland commented 2 years ago

Ug - Sorry you are having this problem. All the data in summary fields is calculated (except for the configuration). So, I would suggest trying to purge everything you can. I would start by disabling and uninstalling summary fields.

Then, check in custom data - delete and remaining fields and then delete the custom group.

If you have phpmyadmin access, you might also check from the civicrm_value_summary_fields_24 table and drop it.

I suspect that the problem is an inconsistency between what fields your civicrm instance thinks are in the civicrm_value_summary_fields_24 table and what fields are actually there. If that table is gone and your system does not report any summary fields custom data groups then you should be ready to re-enable it.

yurg commented 2 years ago

@jmcclelland Thank you for the speedy response. Indeed, I had to delete every custom field related to the module from the database, turn it off and on again and voila! Case closed, you're the best!

On Thu, 17 Mar 2022 at 13:23, Jamie McClelland @.***> wrote:

Ug - Sorry you are having this problem. All the data in summary fields is calculated (except for the configuration). So, I would suggest trying to purge everything you can. I would start by disabling and uninstalling summary fields.

Then, check in custom data - delete and remaining fields and then delete the custom group.

If you have phpmyadmin access, you might also check from the civicrm_value_summary_fields_24 table and drop it.

I suspect that the problem is an inconsistency between what fields your civicrm instance thinks are in the civicrm_value_summary_fields_24 table and what fields are actually there. If that table is gone and your system does not report any summary fields custom data groups then you should be ready to re-enable it.

— Reply to this email directly, view it on GitHub https://github.com/progressivetech/net.ourpowerbase.sumfields/issues/96#issuecomment-1070856937, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACCXARV4BZPVQI6H6GAPW3VAMP2VANCNFSM5Q43UBFQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.*** com>