mysqldrupal-7civicrm

SQL error after CiviCRM 4.7.23 upgrade


After upgrading from CiviCRM 4.7.19 to 4.7.23, views related to CiviCRM are failing to load. The following error is visible on the view configuration page:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM westernfriend_civicrm.civicrm_contact civicrm_contact LIMIT 1 OFFSET 0' at line 1

What should I do to resolve the above error, and restore our view functionality?


Solution

  • In this case, the answer was to carefully read through the upgrade instructions (step 15):

    1. Clear Views' cache (for sites using Views 3 integration)

      If you were using Views integration prior to this upgrade, you will need to go to Administration » Structure » Views » Settings » Advanced and press "Clear Views cache" for Views to capture changes in the CiviCRM Views integration code.