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) »
  • Mailing Labels are missing the contact name
Pages: 1 [2]

Author Topic: Mailing Labels are missing the contact name  (Read 7270 times)

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Mailing Labels are missing the contact name
February 26, 2010, 06:20:12 pm
Edit: http://drupal.demo.civicrm.org/civicrm/contact/add?reset=1&action=update&cid=1416

Save: http://drupal.demo.civicrm.org/civicrm/contact/view?reset=1&cid=1416
(rather I land there, passing through another URL that I can't catch but see flashing in the address bar)

And I should clarify that I only checked this edit/save problem on the contacts I created via event registration.

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Mailing Labels are missing the contact name
February 26, 2010, 07:14:13 pm
Been poking around my DB trying to make sense of which contacts do or don't have greetings/addressee data.  It appears that contact created via drupal registration also have this problem.  On the demo site this user was created via drupal registration:

http://drupal.demo.civicrm.org/civicrm/contact/view?reset=1&cid=1417

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Mailing Labels are missing the contact name
February 27, 2010, 06:14:17 pm
Kirk - Thx for clarifying this. Seems like if the record is NOT created using the back-end 'New Individual' (new contact) form, we don't set defaults for the Addressee and 2 greetings fields. AND then when existing records are edited, we also don't set the defaults. So the only time these are set w/o the user explicitly selecting values from the drop-downs is when contact is created in the 'big contact form' (http://drupal.demo.civicrm.org/civicrm/contact/add?ct=Individual&reset=1).

I think this is not optimal behavior, but there are some complexities with setting these values in profile forms where we don't really know what values will be available (i.e. default Addressee format might have first and last name, but the profile form might not have those fields present). I'll discuss with the team and see what's do-able.
Protect your investment in CiviCRM by  becoming a Member!

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Mailing Labels are missing the contact name
February 27, 2010, 06:40:17 pm
It kind of makes sense that the system can't fill the greeting/addressee field when the contact is created this way.  What is more strange, however, is that when the contact is edited on the 'big contact form' that this does not trigger a reevaluation of these fields if they are still null.

And there should be some way of updating these fields.  As I mentioned, I am also having trouble with the UpdateGreeting.php script.  I just had an intuition that it might be related to the fields not being updated on edit/save.  But if you think it is coincidence, maybe I should start another thread.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Mailing Labels are missing the contact name
February 28, 2010, 06:21:56 pm
Kirk - I don't think the two things are related, so do start another thread for the script issue (and if possible add some debug outputs to the script to get some more clues). Will update this thread RE: developments on the edit form behaviors.
Protect your investment in CiviCRM by  becoming a Member!

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mailing Labels are missing the contact name
February 28, 2010, 11:40:21 pm
Quote
What is more strange, however, is that when the contact is edited on the 'big contact form' that this does not trigger a reevaluation of these fields if they are still null.
If you have not seleted greeting_id during Edit/Save then greetings won't be evaluated. But if you have already set greeting for a contact and then you update it, greeting type will be reevaluated.

For eg: if you have greeting: Dear {first_name} and then you update first name during edit/save, then the greeting will be reevaluated.


Quote
And there should be some way of updating these fields.  As I mentioned, I am also having trouble with the UpdateGreeting.php script.  I just had an intuition that it might be related to the fields not being updated on edit/save.  But if you think it is coincidence, maybe I should start another thread.
I tested this script and seems to be working fine. Can you give more details on this.

HTh
Kurund
Found this reply helpful? Support CiviCRM

flug

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 12
Re: Mailing Labels are missing the contact name
November 12, 2014, 01:30:20 pm
Quote from: Andrew Perry on February 25, 2010, 12:16:56 am
Sorry, but the inline documentation is a little unclear.

Is it more like:

http://<drupal_root>/sites/all/modules/civicrm/bin/UpdateGreeting.php?name=<username>&pass=<pw>&key=<sitekey>&ct=<contact_type>&gt=<greeting_to_update>&id=<id>?

Just FYI if you feel more comfortable doing it direct in the SQL table, the command is something like this:

Code: [Select]
UPDATE `civicrm_contact` SET `addressee_display` = `display_name`  WHERE (`addressee_display` is NULL OR `addressee_display` = "")
You can test by restricting it to just one contact by something like this:
Code: [Select]
UPDATE `civicrm_contact` SET `addressee_display` = `display_name`  WHERE (`addressee_display` is NULL OR `addressee_display` = "") AND id=100
Similar code would update the other fields--this only does addressee_display.

Of course, back up your civicrm_contact table before doing anything like this.

flug

  • I post frequently
  • ***
  • Posts: 126
  • Karma: 12
Re: Mailing Labels are missing the contact name
November 12, 2014, 02:04:50 pm
Quote from: flug on November 12, 2014, 01:30:20 pm

Just FYI if you feel more comfortable doing it direct in the SQL table, the command is something like this:

Code: [Select]
UPDATE `civicrm_contact` SET `addressee_display` = `display_name`  WHERE (`addressee_display` is NULL OR `addressee_display` = "")

However the real/much easier way to do this in 4.x+ would be to just run the Scheduled Jobs admin page & run the update_greeting script from there.  Instructions here:

 http://wiki.civicrm.org/confluence/display/CRMDOC/Update+Greetings+and+Address+Data+for+Contacts

Question: On that wiki page, it says "Contacts whose greetings are NULL will not be updated unless the force=1 argument is passed".  I **think** the situation is actually the opposite.  That is, if force=0 (or force= is omitted) then ONLY contacts whose greetings are NULL will be updated.

If you set force=1, then ALL contacts will be updated regardless of whether the greeting is NULL or not.

Can anyone verify that is the case?

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Mailing Labels are missing the contact name

This forum was archived on 2017-11-26.