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 »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views Integration - Custom fields not available
Pages: [1]

Author Topic: Views Integration - Custom fields not available  (Read 2119 times)

ericaordinary

  • Guest
Views Integration - Custom fields not available
August 09, 2010, 09:42:00 pm
Hi all,

Hoping that someone can shed some light, as I've been trying to figure this out for hours.  I can't see any of my custom fields in Views 2, even though I'm fairly sure I've integrated correctly.  The following custom field groups are listed in my settings.php file:

  'civicrm_value_affiliations_1'             => 'civicrm.',
  'civicrm_value_anhlc_memberships_8'        => 'civicrm.',
  'civicrm_value_annual_income_5'            => 'civicrm.',
  'civicrm_value_annual_nhcp_funding_6'      => 'civicrm.',
  'civicrm_value_auspice_information_3'      => 'civicrm.',
  'civicrm_value_committee_memberships_7'    => 'civicrm.',
  'civicrm_value_network_affiliations'       => 'civicrm.',
  'civicrm_value_organisation_information_4' => 'civicrm.',
  'civicrm_value_test_network_affiliations'  => 'civicrm.',
 
but none of the above appear in Views.  I don't get any errors using core fields, just no option to select custom fields at all.  Any help would be greatly appreciated!

Cheers,
Erica.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Views Integration - Custom fields not available
August 09, 2010, 09:46:48 pm
someone with more knowledge about this might ask you to check your prefix - but you would be wiser to search forum for that to check i am not wasting your time
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

ericaordinary

  • Guest
Re: Views Integration - Custom fields not available
August 09, 2010, 11:05:58 pm
Peter, I had a look at my prefix and it's currently just $db_prefix = array(.  I've tried changing it to some of the other prefixes mentioned in the documentation but they all cause the site to break.  Is there something else I should be trying?  FYI, my civicrm is in a different DB to my drupal.

TallDavid

  • I post occasionally
  • **
  • Posts: 41
  • Karma: 2
    • ATO Zeta Mu Alumni
  • CiviCRM version: 3.4.8
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.52
  • PHP version: 5.2.13
Re: Views Integration - Custom fields not available
August 11, 2010, 09:28:31 pm
Take a look at this: http://drupal.org/node/662860#comment-2391510 and this http://redspire.net/content/problems-and-solutions-problems-views-2-civicrm-and-drupal-6

I worked on this issue some months ago and documented my findings in the references above.  Hopefully they will be of use.

David

ericaordinary

  • Guest
Re: Views Integration - Custom fields not available
August 12, 2010, 08:17:25 pm
Hi all,

Still trying to figure this one out and have discovered that my Membership and Relationship custom fields are showing up fine, but not for Contacts.  When double checking in PHPMyAdmin that my custom field groups for contacts were active I noticed a difference in the "extends_entity_column_value" table.  For Membership and Relationship custom field groups it gives an ID number of the membership or relationship type, but for all my contact field groups it gives the name of the my contact sub-type instead of the ID number.

I changed the value to the ID number of the contact sub-type in my DB, but this didn't bring the custom field group into views.  I then added a custom field group just for "organization" with no sub type, and this group now appears in views.

So I conclude that Civi/Views are having trouble communicating with Contact Sub Types, but I'm not sure how to fix this!

Any ideas?

ericaordinary

  • Guest
Re: Views Integration - Custom fields not available
August 12, 2010, 08:58:52 pm
Further, adding the following under case "Organization": (line 4934) to my civicrm.views.inc file displays the missing custom groups in Views:

    case "Contact_Subtype_Name1":
    case "Contact_Subtype_Name2":


Scrap that, turns out my custom group had been modified to "NULL" in the extends_entity_column_value field.  Updating it to my contact subtype removes the group from Views.
« Last Edit: August 12, 2010, 09:12:03 pm by ericaordinary »

Rahul Bile

  • I post occasionally
  • **
  • Posts: 112
  • Karma: 16
  • impossible says, I M Possible
    • I AM POSSIBLE
Re: Views Integration - Custom fields not available
August 12, 2010, 10:08:18 pm
ericaordinary ,

Quote
So I conclude that Civi/Views are having trouble communicating with Contact Sub Types, but I'm not sure how to fix this!

I tried with CiviCRM 3.2.1 and views 2.11 with custom data Used for Individual and Type student. And I can see the custom fields in views. Is yours the same custom data type ?


Rahul.
Consider donating to CiviCRM if you use it. http://civicrm.org/donate

ericaordinary

  • Guest
Re: Views Integration - Custom fields not available
August 12, 2010, 10:32:25 pm
Rahul - my data sub types extend organisation.  I just tested by making a new individual sup type and data group and it showed up the group in views.  Seems to be restricted solely to organisations.

ericaordinary

  • Guest
Re: Views Integration - Custom fields not available
August 12, 2010, 10:52:30 pm
Just tested by making a new organisation sub-type and custom data group for that sub-type and views picked up the data group fine.  I think there must be an issue with my existing contact sub-types.  Is there a way to clear civicrm's cache to see if that fixes the problem?

ericaordinary

  • Guest
Re: Views Integration - Custom fields not available
August 12, 2010, 11:23:54 pm
And further playing around reveals new custom data groups created for existing contact sub types work fine with Views.  My uneducated guess is that something went wrong between installation and upgrading to 3.2.  I'm going to re-create those custom data groups, which is annoying but won't take me too long.  Hopefully this helps other people de-bug similar views issues.

Cheers for everyones help,
Erica.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Views Integration - Custom fields not available

This forum was archived on 2017-11-26.