I have an instance of drupal 7 installed… and it is storing its data in database A I have then installed CiviCRM… and it is storing its data in database B
I have placed the information shown at sites/all/modules/civicrm/install/index.php in to the settings.php file … so the CiviCRM tables can be seen and found. Also, the base URL is set correctly in the civicdm.settings.php file.
Now when I go to create a view…
- I select “Add a view” and specify a name for the view (the view is of type page);
- then i select CiviCRM Contacts from the Show drop-down list…
- decide on the display format and then click continue and edit to get to the screen to add the fields as required.
- On the view creation screen I have added the field CiviCRM Contacts: First Name and that shows correctly with no errors
- but when I try adding the CiviCRM Contacts: Contact Sub Type field to the Filter Criteria section (or the Fields section for that matter) I get the following error message:
Error Message states (some info substituted with generic information): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘<user_which_created_drupal_database>.<drupal_pre-fix>_civicrm_value_<‘civicrm custom field postfix> doesn't exist’
By the looks of things, the filter criteria section of the view is looking to the Drupal database for the CiviCRM table for the subtype field - which it obviously won’t find as the table is actually in the CiviCRM database (Database B). A similar situation occurs if I try to add the sub-type field into the 'Fields' sections of the view creation process.
Sounds like this is a configuration issue (E.g Views is looking in the Drupal database and not the CiviCRM database - but yet it does look in the correct database when looking up the Contacts Name) - anyone got any ideas or had this happen to them before, looking for a solution.