1

Now that Civi version 4.7.25 has introduced creation_date for activities, I am having SQL errors when I try to create a new activity or delete a recent activity, which results in fatal errors:

Unknown column 'created_date' in 'field list'

I can't replicate this in the CiviCRM sandbox (http://dmaster.demo.civicrm.org/civicrm/), although that is running Civi 4.7.28.

If I run the SQL command in phpmyadmin, then it gives the same error, so I guess there's some problem with the table civicrm_activity since updating to 4.7.25

Any ideas?

1 Answer 1

2

Start by checking that the civicrm_activity table does have a created_date column. If not, maybe something went wrong with the upgrade process - which is a bigger issue.

If it does exist, do you have logging enabled? When you change civicrm_activity, a trigger will update the related log_civicrm_activity table and if that does not have created_date then the original action will fail. If that is case, you can disable and then re-enable logging at Administer > System Settings > Misc which should fix the problem.

1
  • Thanks Aidan. Turning off logging solved the problem. It seems like the created_date column had been created ok for the main civicrm_activity table but not for the log_civicrm_activity table. When I tried to re-enable logging, it gave this error (so I'm just going to leave logging off for now): [nativecode=1194 ** Table 'log_civicrm_activity' is marked as crashed and should be repaired] Oct 17, 2017 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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