How to display CiviCRM Custom Fields in a Drupal 8 View

CiviCRM Asked by paul77 on December 18, 2020

I’ve been not very experienced with CiviCRM. I try to get CiviCRM custom fields displayed in Views.
I’ve installed Drupal 8.9.3., CiviCRM 5.28.3, CiviCRM Entity 8.x-3.0-beta1.

Drupal and CiviCRM run on different databases on the same server with the same database user.
In added the array with the links to the correct database to civicrm.settings.php as described in

In Drupal 7, when I created a view(user) I was offered different CiviCRM fields. This doesn’t happen in my Drupal 8 installation.

Besides when In try to create a view(contacts) I get the following error message:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'usr_p550866_1.civicrm_contact' doesn't exist: SELECT AS id FROM {civicrm_contact} civicrm_contact LIMIT 11 OFFSET 0; Array ( ) 

(usr_p550866_1 is the database for Drupal)

Is this a problem with Drupal 8 or do I anything wrong?

Your help would be appreciated very much.

One Answer

You need to add it in settings.php not civicrm.settings.php. once you add them in settings file clear Drupal cache

Answered by Pradeep Nayak on December 18, 2020

Add your own answers!

Related Questions

Anonymous role cannot make contribution

1  Asked on December 20, 2020 by sts99


How can I assign one contact to one of the team workers?

2  Asked on December 10, 2020 by vanessa-davila


How to link two Organizations with a pair relationship?

1  Asked on August 30, 2020 by guillaume-sorel


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP