CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Views Integration code missing in 3.3.5?
Pages: [1]

Author Topic: Views Integration code missing in 3.3.5?  (Read 1739 times)

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Views Integration code missing in 3.3.5?
February 19, 2011, 07:50:46 am
Is the Views integration code missing in 3.3.5? (I'm talking about the code that needs to be added in settings.php - this used to appear on the CMS Integration page - it doesn't in 3.3.5.)

Perhaps it's done automatically now; in any event, I'm getting the error below when I try to set up a CiviEvent calendar, which seems like it may be related.

This is a fresh install; if the modification to settings.php is, indeed, necessary in 3.3.5, people who are doing an upgrade wouldn't see this insofar as settings.php would already have the required code.

I can try pasting and modifying existing code from a 3.3.3 installation, but I'd just as soon not until I know what's going on.

Input here much appreciated - thanks!

UPDATE: Yup - looks like it's missing on the CMS Integration page, but it is required. I modified and pasted the code from the sandbox site and it looks to be working. No biggie, but it may as well be noted somewhere. Otherwise, looking good!

* user warning: Table 'scdc.civicrm_event' doesn't exist query: SELECT COUNT(*) FROM (SELECT civicrm_event.start_date AS civicrm_event_start_date, civicrm_event.title AS civicrm_event_title, civicrm_event.id AS id FROM civicrm_event civicrm_event WHERE (civicrm_event.is_active <> 0) AND (civicrm_event.is_public <> 0) AND (civicrm_event.is_template = 0) ) count_alias in [site]/sites/all/modules/views/plugins/views_plugin_pager.inc on line 142.
    * user warning: Table 'scdc.civicrm_event' doesn't exist query: SELECT civicrm_event.start_date AS civicrm_event_start_date, civicrm_event.title AS civicrm_event_title, civicrm_event.id AS id FROM civicrm_event civicrm_event WHERE (civicrm_event.is_active <> 0) AND (civicrm_event.is_public <> 0) AND (civicrm_event.is_template = 0) ORDER BY civicrm_event_start_date ASC LIMIT 0, 10 in /[site]/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1144.
« Last Edit: February 19, 2011, 08:01:25 am by bcobin »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Views Integration code missing in 3.3.5?
February 19, 2011, 10:42:37 am
What precise version do you have? I see the integration code:

http://drupal.demo.civicrm.org/civicrm/admin/setting/uf?reset=1

just fine.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Re: Views Integration code missing in 3.3.5?
February 19, 2011, 10:51:49 am
3.3.5 - As I mentioned, I ended up modifying and pasting the code from the Civi sandbox, where it does, indeed, appear. (The sandbox looks like it has an "internal" revision number, as opposed to being an official release.)

It's a clean install and I checked in Garland, so it's not a theme issue on my end - it just looks like it might be an oversight in the release version. Just making a note of it.
« Last Edit: February 19, 2011, 11:07:42 am by bcobin »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Views Integration code missing in 3.3.5?
February 19, 2011, 07:49:01 pm
The db_prefix values for settings.php are displayed conditionally - IF...
- views module is installed
- CiviCRM is in a different DB than Drupal (i.e. the CIVICRM_DSN in civicrm.settings.php is different from the CIVICRM_UF_DSN).
Protect your investment in CiviCRM by  becoming a Member!

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Re: Views Integration code missing in 3.3.5?
February 20, 2011, 07:28:06 am
This is interesting.

This is a website I'm doing for an institution that has an acronym; let's call it SCDC. When I created the Drupal database, I created it as SCDC (all caps) out of habit; when I created the Civi database, I created it as scdc_civi (all lowercase).

In settings.php, the generated values for CIVICRM_UF_DSN and CIVICRM_DSN are the same: the Civi database. (This should not be.) I presume that if had I entered the information incorrectly upon Civi installation - which I suppose is possible though unlikely - I would have seen other problems.

As a side note, in PHPMyAdmin, whereas similarly-named databases are grouped together, these two appear as totally separate.

I did a new test install (with all lowercase-named databases) and everything works as expected. And changing the CIVICRM_UF_DSN value to the proper database seems to work fine for the site in question - and the Views code, indeed, appears.

I suppose this is an odd use case, but it's good to know that Civi checks these conditions - perhaps this will be helpful for somebody else who runs into the same issue - upper and lower case matter! Thank you for the quick and informative response and for all the excellent work you're doing!

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Views Integration code missing in 3.3.5?
March 22, 2011, 06:18:37 pm
I am using 3.3.5, have two separate databases and also do not see the Views integration code.  I actually ALREADY implemented the integration code in 3.2, so my settings.php had the code in it already, and I know at one point in time civiCRM was showing me the code on the CMS integration config page.  However, when I upgraded to 3.3, I added a few more custom fields.  These fields need to be added to the list of tables to show up properly, I go to the CMS integration page, but the integration code is gone.

Please review and tell me if I am missing something.   Is it possible that the code that checks to see if a separate db exists needs to be re-evaluated?   Is it possible the existance of a 2nd database is stored in some cache file that needs to be flushed?  Which settings file does it check, civicrm.settings.php or settings.php?  This is a prototype site so you can login if you want to debug this.  Email me.  Thanks guys.

PS. As a workaround I just copied and pasted the names of the new tables into the settings.php file, so I'm ok for now ...... 

Code: [Select]

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| vida_civicrm       |
| vida_drupal        |
+--------------------+
3 rows in set (0.00 sec)

Code: [Select]
$db_url['default'] = 'mysqli://user:xxxxxxxxx@localhost/vida_drupal';
$db_url['civicrm'] = 'mysqli://user:xxxxxxxxx@localhost/vida_civicrm';
$db_prefix = array(
  'default'                                  => '',
  'civicrm_acl'                              => 'vida_civicrm.',
  'civicrm_acl_cache'                        => 'vida_civicrm.',
  'civicrm_acl_contact_cache'                => 'vida_civicrm.',
  'civicrm_acl_entity_role'                  => 'vida_civicrm.',
  'civicrm_activity'                         => 'vida_civicrm.',
  'civicrm_activity_assignment'              => 'vida_civicrm.',
etc etc etc....

FYI I tried this... not as good but still works sorta...no change to civicrm's behavior
Code: [Select]
$db_url = 'mysqli://user:xxxxxxxxx@localhost/vida_drupal';
$db_prefix = array(
  'default'                                  => '',
  'civicrm_acl'                              => 'vida_civicrm.',
  'civicrm_acl_cache'                        => 'vida_civicrm.',
  'civicrm_acl_contact_cache'                => 'vida_civicrm.',

(See attachments for screenshots of pages and views)
« Last Edit: March 22, 2011, 06:27:42 pm by Stoob »
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Views Integration code missing in 3.3.5?
March 23, 2011, 10:04:03 am

hey stoob:

might be easier to discuss, debug and figure this out on IRC

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: Views Integration code missing in 3.3.5?
March 23, 2011, 10:54:34 am
I found out what happened, my civicrm.settings.php file was misconfigured.  Sorry for the trouble.
Try CiviTeacher: the online video tutorial CiviCRM learning library.

technil

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
  • CiviCRM version: 3.2, 3.3.5
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.41, 5.0.45
  • PHP version: 5.3.2, 5.2.6
Re: Views Integration code missing in 3.3.5?
March 25, 2011, 08:10:21 am
I happened to run into this thread while restoring drupal views 2 integration to a site. I was helping to recover from a server failure with a forced migration/upgrade from 3.1 -> 3.3.5 due to a new server with php5.3. These few things may be of help if something isn't working properly. (In my case, the views module code from civicrm hadn't been put into place, and settings.php was missing the necessary entries.) This install has durpal and civicrm in separate databases.

-Make sure the contents of the folder /civicrm/drupal/modules/views from the decompressed civicrm download tarball is copied to /sites/all/modules/views.
-Make sure the output from http://your.domain.tld/civicrm/admin/setting/uf?reset=1 has been added to the drupal settings.php file. thanks @hershel
-For me, those two steps brought back the existing views 2 integration for civicrm, (and they were the last things after the recovery not working).
-If you are still having difficulties, check that civicrm.settings.php is configured properly, and check database access for the users of the databases (and what they should be based on your install type, separate, vs. combined db) though you will likely have many more problems than this if db user privileges or settings in civicrm.settings.php are mucked up.
to check privileges:
Using mysql at the command line as the root user or someone with mysql GRANT privileges (probably the user used to create the databases in the first place) may help:
Code: [Select]
SHOW GRANTS FOR `drupalorciviusername`@'localhost';
-hth




Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Views Integration code missing in 3.3.5?

This forum was archived on 2017-11-26.