Problems with Views Integration

Created on 22 December 2020, over 3 years ago
Updated 3 December 2023, 7 months ago

Problem/Motivation

I am just setting up a new Drupal 8 CiviCRM site (Having been running on D7 for a while) and finding some problems. I don't know if these are the beta state of the product, or my lack of understanding.

I have Drupal 8.9.11. CiviCRM 5.32.2. Civicrm_Entity 8.x-3.0-beta1.
Running on a single database. All Drupal tables have prefix "drupal_".
Have enabled the Contact entity type and several others in the civicrm_entity module settings.

Please advise if the following are expected.

1. On D7 is it necessary to copy a set of CiviCRM table details into the Drupal settings.php file. Is this still needed in D8, since I can't find them?

2. The database contains a set of tabled named "drupal_civicrm_contact", and similar (all empty). The D7 system does not have an equivalent - is this correct?

3. I create a simple View calling up Contact records and showing the Contact Id, Contact Type, and Display Name. It returns an empty result, and gives the SQL query as follows. This does not seem sufficient?

SELECT civicrm_contact.id AS id
FROM
{civicrm_contact} civicrm_contact
LIMIT 11 OFFSET 0

4. I create a View of Drupal User records, which works, and then add the Relationship to CiviCRM Contacts. This fails with the error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lalg_d8civi.drupal_civicrm_uf_match' doesn't exist: SELECT users_field_data.uid AS uid, civicrm_contact_civicrm_uf_match.id AS civicrm_contact_civicrm_uf_match_id FROM {users_field_data} users_field_data LEFT JOIN {civicrm_uf_match} civicrm_uf_match ON users_field_data.uid = civicrm_uf_match.uf_id LEFT JOIN {civicrm_contact} civicrm_contact_civicrm_uf_match ON civicrm_uf_match.contact_id = civicrm_contact_civicrm_uf_match.id WHERE users_field_data.status = :db_condition_placeholder_0 LIMIT 11 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 )
The table 'lalg_d8civi.drupal_civicrm_uf_match' indeed does not exist, though 'civicrm_uf_match' does, and is populated.

With thanks, Tony

πŸ’¬ Support request
Status

Closed: works as designed

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.69.0 2024