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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Problem with Default Profile Fields: Demographics
Pages: [1]

Author Topic: Problem with Default Profile Fields: Demographics  (Read 2002 times)

yamba

  • Guest
Problem with Default Profile Fields: Demographics
November 28, 2007, 04:46:30 pm
Hi,

I'm using CiviCRM 1.9 with Drupal and I have a problem when creating a new contact.  The "Demographics" block is not displayed.

When I go in  CiviCRM › Administrer CiviCRM › Global Settings, the checkbox is checked for the Demographics information, for the "Editing Contacts" options.

When I create a new individual, the Demographics block is not displayed. But when I edit a contact, the block is displayed.

What could cause this behavior?  I did not find any similar case in the forum discussions.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Problem with Default Profile Fields: Demographics
November 29, 2007, 11:00:01 am
Hmm - just looked at the "New Individual" screen on our 1.9 demo - and the Demographics section is definitely included (it's a ways down the form since folks have added a bunch of custom fields):

http://demo.civicrm.org/drupal/civicrm/contact/add?ct=Individual&reset=1

... are you using a different URL for creating a new individual contact? Please see if you can recreate the behavior you're seeing on our demo.
Protect your investment in CiviCRM by  becoming a Member!

yamba

  • Guest
Re: Problem with Default Profile Fields: Demographics
December 04, 2007, 07:10:23 am
Thanks for the quick reply.

I've verified in my installation, and it's the same URL (q=civicrm/contact/add&ct=Individual&reset=1).

I've also start a new installation, prepopulated with the demo information, and I could not reproduce the problem.

Could it be related to the fact that I'm using a 1.9 version which is actually an update from 1.8 installation? or to the fact that I'm using fr_CA localization?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Problem with Default Profile Fields: Demographics
December 04, 2007, 10:15:38 am
I just tried switching our 1.9 public demo site to fr_CA localization - and the New Individual form still included a Demographics section. Not sure what might be causing your issue - but if you haven't updated to the latest 1.9 distribution, I'd do that. Then go to Global Settings >> Site Preferences and try un-checking the Demographics checkbox under Editing Contacts, Saving, then re-checking it and saving again.

Also, you could try clearing the template cache using the instructions found under Global Settings >> Debugging.

Finally, with debugging enabled you could add &smartyDebug=1 to the end of your URL for the New Individual form and then review the template variables shown in the pop-up window. You should see a variable and value like this:
Code: [Select]
{$showDemographics} 1
Shooting in the dark a bit, but hopefully one of these will help.
Protect your investment in CiviCRM by  becoming a Member!

yamba

  • Guest
Re: Problem with Default Profile Fields: Demographics
December 09, 2007, 02:21:10 am
Hi,

I've tried the unselect, save, reselect and save sequence in the Global Settings > Site Preferences.
I've also tried the steps described in the debug mode to clean up the cache directories and it did not change the behavior.

In the debug screen, it shows:  {$showDemographics} empty

I'm using 1.9, updated from 1.8.  I've tested on 2 other different installations of 1.9 updated from 1.8. Could the problem be related to the update process?

I've also tried to desactivate and reactivate some custom fiels blocks and it worked for those blocks.

Here is some extra debug info on demographics:

{$demographics} Array (2)
show => <a name="demographics_show" id="demog...
hide => <a name="demographics_hide" id="demog...

Is there a place in the code or in the database where I could force to show the demographics?

Thanks for your assistance

yamba

  • Guest
Re: Problem with Default Profile Fields: Demographics
December 09, 2007, 03:04:16 am
PS - I've just realized: now, whan i do View contact, it does show the Demographics, but when I Edit the contact, the block is not showing (even if the contact has demographics information).

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: Problem with Default Profile Fields: Demographics
December 09, 2007, 07:36:40 am

1. try truncating the civicrm_preferences table and reload the data for that table from civicrm_data.mysql. If this does not work, you might want to try step 2

2. in CRM/Contact/Form/Edit.php, line 138

Code: [Select]
        $this->_editOptions  = CRM_Core_BAO_Preferences::valueOptions( 'contact_edit_options' );

change this to:

Code: [Select]
        $this->_editOptions  = CRM_Core_BAO_Preferences::valueOptions( 'contact_edit_options' );
        $this->_editOptions['Demographics'] = true;


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

yamba

  • Guest
Re: Problem with Default Profile Fields: Demographics
December 09, 2007, 09:18:15 am
Unfortunately, I had to solve it with step 2 (code modification).

Regardind step 1,  I found a strange situation. There were two rows in my civicrm_preferences tables:

INSERT INTO `civicrm_preferences` VALUES(1, 1, NULL, 1, 2, '123456789', '1234', '12345678910', '1234', '1234567891011', '{street_address}\n{supplemental_address_1}\n{supplemental_address_2}\n{city}{, }{state_province}{, }{country}\n{postal_code}', '{street_address}\n{supplemental_address_1}\n{supplemental_address_2}\n{city}{, }{state_province}{, }{country}\n{postal_code}', '{individual_prefix}{ } {first_name}{ }{middle_name}{ }{last_name}{ }{individual_suffix}', NULL, NULL, NULL);
INSERT INTO `civicrm_preferences` VALUES(2, 1, NULL, 1, 1, '123456789', '1234', '12345678910', '1234', '123456891011', '{street_address}\n{supplemental_address_1}\n{supplemental_address_2}\n{city}{, }{state_province}{ }{postal_code}\n{country}', '{street_address}\n{supplemental_address_1}\n{supplemental_address_2}\n{city}{, }{state_province}{ }{postal_code}\n{country}', '{individual_prefix}{ } {first_name}{ }{middle_name}{ }{last_name}{ }{individual_suffix}', NULL, NULL, NULL);

I don't understand when or how the row with the second domain was created. I just have 1 domain in the civicrm_domains table.

Is there a way of make sure that my 1.8 updated tables to 1.9 are OK?  I did not have any error prompting during the update process...

yamba

  • Guest
Re: Problem with Default Profile Fields: Demographics
December 09, 2007, 09:23:20 am
Another detail: when I installed 1.8, I used the script civicrm_data.fr_CA.mysql.  After installation, I mainly added custom fields, profiles, ACLs, Groups and Tags.

Is there a way to do a 1.9 fresh install and reuse the customization work I did?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Problem with Default Profile Fields: Demographics

This forum was archived on 2017-11-26.