TransWikia.com

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 https://docs.civicrm.org/sysadmin/en/latest/integration/drupal/views/.

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 civicrm_contact.id 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!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP