0

Upgraded a few days ago, everything seems fine. Just word that there are some issues registering new participants/payments, the UI "hangs" on submitting the form, but still records the participation.

Trying it myself, as administrator, I could see that an error was being generated during the transaction, breaking the ajax UI for non-admins.

    DB Error: No such field. 

After looking at the logs, it becomes pretty obvious that the error is being caused by a bad query relating to civicrm_activity. It would also explain why the registrations are being recorded despite the issue.

[nativecode=1054 ** Unknown column 'a.weight' in 'field list']

    [type] => DB_Error

    [user_info] => SELECT a.id as `id`, a.source_record_id as `source_record_id`, a.activity_type_id as `activity_type_id`, a.subject as `subject`, a.activity_date_time as `activity_date_time`, a.duration as `duration`, a.location as `location`, a.phone_id as `phone_id`, a.phone_number as `phone_number`, a.details as `details`, a.status_id as `status_id`, a.priority_id as `priority_id`, a.parent_id as `parent_id`, a.is_test as `is_test`, a.medium_id as `medium_id`, a.is_auto as `is_auto`, a.relationship_id as `relationship_id`, a.is_current_revision as `is_current_revision`, a.original_id as `original_id`, a.result as `result`, a.is_deleted as `is_deleted`, a.campaign_id as `campaign_id`, a.engagement_level as `engagement_level`, a.weight as `weight`, a.is_star as `is_star`, a.created_date as `created_date`, a.modified_date as `modified_date`
FROM civicrm_activity a
WHERE (a.source_record_id = "77904") AND (a.activity_type_id = "6")
LIMIT 25
OFFSET 0

I can confirm that my civicrm_activity table DOES NOT have the weight column...

Does anyone have any experience with this kind of nuttiness?

0

Comparing a fresh CiviCRM DB with my own revealed the differences between existing and expected.

I added the weight field to the civicrm_activity table in the right place and things were resolved.

This installation has been through years and years of updates and there have been several occasions over the years where half-baked upgrade scripts have left the DB in similarly half-baked corners.

Gladly, this only caused some UI issues and is now resolved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.