- Issue created by @lkuttner
- πΊπΈUnited States markusa
It is normal not to see any fields here:
/admin/structure/civicrm-entity/civicrm-contact/fieldsThis is the form for adding any Drupal native fields, but there would not be any there when first installing or setting up.
Do you see contacts listed here?
/admin/structure/civicrm-entity/civicrm-contactBack to your Drupal View.
Have you tried adding "Display Name" field to the view?
What "Format" and "Show" values do you have on your View configuration?
Try "Format" = "Unformatted List" and "Show" = "Fields" Thank you @markusa.
Yes, contacts are listed at /admin/structure/civicrm-entity/civicrm-contact
I have tried adding CiviCRM Contact (CiviCRM Entity): Display Name and a few other fields
The field is set to "Format" = "Unformatted List" and "Show" = "Fields"
The view access is set to Unrestricted. This is on D9.
I have used CiviCRM Entiity for many years on D7 with no problem.I just noticed some errors in the log: Drupal\Core\Database\DatabaseAccessDeniedException: SQLSTATE[HY000] [1045] Access denied
I do have 'CIVICRM_DSN', 'mysql://user:pw@localhost:3306/prod?new_link=true' defined in my civicrm.settings.php
I am wondering if the $ in the pw as %24 is possibly an issue.- πΊπΈUnited States markusa
SQLSTATE[HY000] [1045] Access denied
This would be that the database user does not have access to the CiviCRM tables.Yeah, could try changing the password.
Actually, I found that this is only partially resolved. I now get field data, but when I add a relationship, I get a SQL error in the view such as SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'user'@'localhost' for table 'civicrm_contribution': SELECT COUNT(*) AS "expression" FROM (SELECT 1 AS "expression" FROM "civicrm_contact" "civicrm_contact" LEFT JOIN vnprod.civicrm_contribution "contact_id_civicrm_contact" ON civicrm_contact.id = contact_id_civicrm_contact.contact_id) "subquery"; Array ( ).
I have both Drupal and CiviCRM in the same database, using the same MySQL account with the typical permissions. I see posts on how to handle dual db systems getting this error, but not with a single db. This is with MySQL 8x.- Status changed to Closed: works as designed
8 months ago 6:20pm 25 April 2024 - πΊπΈUnited States markusa
The updated database user / password should be set in the settings.local.php
$databases['civicrm']['default'] = array ( 'database' => 'database_name', 'username' => 'database_user', 'password' => 'database_password', 'prefix' => '', 'host' => 'localhost', 'port' => '3306', 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', 'driver' => 'mysql', );