2

I was trying to create a membership directory view in Drupal 7 but came across this error:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'egyptia2_ess.droe_civicrm_membership' doesn't exist

I created the view and selected Show CiviCRM Memberships for the Content, and then after clicked continue and edit, it gave me the above error.

Double checking, I don't see that table in my MySQL database and am curious if there something I have to activate first prior to creating a view such as this one...

I'd appreciate any help - Matt

  • Note this is only an issue if you have Drupal and CiviCRM in two separate databases - and is one big advantage for Views builders for having them in a single database. You may also notice that the Views will have problems after an upgrade until you do an extra 'clear cache' in Drupal – petednz - fuzion Jul 15 '18 at 21:43
  • @petednz-fuzion - Actually, I'm receiving this error while both Drupal and CiviCRM are in the same database, and I can only confirm this because it is the only database on my server (and the settings references as well...) - Could you see any other causes for this error? – Matthew Jul 15 '18 at 22:02
  • We often find we have to do an extra Clear Cache in Drupal after a civi upgrade as mentioned on my previous comment. have you tried that? – petednz - fuzion Jul 16 '18 at 2:05
4

If you have separate databases then you need to enable CiviCRM Drupal views integration you need to add some information to the sites settings.php file.

Visit - /civicrm/admin/setting/uf?reset=1

Data from the above CiviCRM page needs to be copied and pasted into your sites settings.php file.

Detailed info can be found here

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.