I am trying to integrate Views with CiviCRM but cannnot see the code in the CMS Datbase section to add to the settings.php file. I am stuck on step 5. Has anyone come across this issue?

The steps are here - http://wiki.civicrm.org/confluence/display/CRMDOC/Views3+Integration

  • If you are using one database for both Civi and Drupal, then you don't need the code for Views integration. – pmoz Aug 8 '15 at 17:38
  • Using different databases for them. Thanks pmoz – Sohal Khatwani Aug 9 '15 at 12:57
  • so are you saying that at /civicrm/admin/setting/uf?reset=1 you see nothing? any other indications that your drupal<->civi linkages is problematic? do you have a drupal user id on the contact summary screen and can click it to go to the user record, and vice versa, on drupal user record do you have the civi Name and Address profile showing, and the link back to the civi record? – petednz - fuzion Aug 9 '15 at 20:52
  • That is right pete. I can click between both civicrm user and the drupal user record and it works fine. I cannot see any linkage problem. I see the link to the contact dashboard on the drupal user field. – Sohal Khatwani Aug 9 '15 at 23:12

Solved. You need to go to your civicrm.settings file first and then add the drupal base URL in the section where it says add your drupal URL and then you will see the code.

  1. Follow the steps in the link for Views.

  2. In the civicrm.settings.php file there will a comment around line 58 which asks to enter the Content Management System (CMS) database connection details. Once this is entered the views should show up.

| improve this answer | |
  • Congratulations! – Joe McLaughlin Aug 10 '15 at 3:12
  • surprised that wasn't causing other havoc – petednz - fuzion Aug 10 '15 at 21:11
  • Thanks Joe. Pete we are really beginning to integrate CiviCRM into websites more seamlessly. I am sure that it would cause some chaos in the longer run if not fixed. – Sohal Khatwani Aug 11 '15 at 4:53
  • @SohalKhatwani I'm having the same problem but I'm not understanding your solution. Which line did you edit in civicrm.settings.php ? The way this response is written it's like replacing the MySQL URL with the base URL which doesn't make sense at all. Can offer more detailed instructions? ty. – atmosx Aug 29 '16 at 8:41
  • Hi @atmosx. There are a couple of steps to get the CiviCRM data into Drupal Views. I will add another detailed answer below. – Sohal Khatwani Aug 30 '16 at 6:47

Sohal, see this video from CiviCON Denver 2015 as well - it might help - CiviCON Denver- CiviCRM Drupal Integration Showcase

| improve this answer | |
  • Joe the video is great. Learned a fair bit from it. However, no solution to the code. – Sohal Khatwani Aug 9 '15 at 13:30
  • Sohal, oh well. A question - why are you not using just one database for both CiviCRM and Drupal? – Joe McLaughlin Aug 9 '15 at 19:22
  • Hi Joe, we prefer to keep the database separate as some of our clients do not go for CiviCRM and once integrated we find it quite hard to remove CiviCRM from Drupal when the database is the same. – Sohal Khatwani Aug 10 '15 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.