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) »
  • Possible bug and fix: Maling Labels in 3.1 now prints contacts w/o adresses too
Pages: [1]

Author Topic: Possible bug and fix: Maling Labels in 3.1 now prints contacts w/o adresses too  (Read 1204 times)

obiuquido144

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 4
Possible bug and fix: Maling Labels in 3.1 now prints contacts w/o adresses too
March 15, 2010, 02:47:12 pm
After upgrading from 2.2.2 to 3.1.2, when we print Mailing labels, we now get all the contacts from the search printed out, not just the ones that have actual mailing adresses. In 2.2.2, contacts with e.g. only a name and email were skipped and not printed out on labels.

I did a diff on CRM\Contact\Form\Task\Label.php between 2.2.2 and 3.1.2.
A lot of code has changed, but when I replace
Code: [Select]
                foreach ( $mailingFormatProperties as $key => $dontCare ) {
                    if ( CRM_Utils_Array::value( $key, $contact ) ) {




                        $found = true;
                        break;
                    }
                }
around line 280 with

Code: [Select]
                foreach ( $sequence as $sequenceName) {
                    // we are interested in only those
                    // $contact which contains any
                    // of the address sequences
                   
                    if ( CRM_Utils_Array::value( $sequenceName, $contact ) ) {
                        $found = true;
                        break;
                    }
                }
from 2.2.2,
mailing labels start working again like they used to: contacts without postal addresses are omitted from the printout.

Not sure if this is a regression or if there's a reason for $mailingFormatProperties as $key => $dontCare now being used instead of $sequence as $sequenceName . Maybe someone with a better understanding of the code could explain better / make the decision about filing a bug for this.

Cheers! Boris

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: Possible bug and fix: Maling Labels in 3.1 now prints contacts w/o adresses too
March 15, 2010, 05:39:38 pm

can you double check and ensure you can reproduce this on http://drupal.demo.civicrm.org/

if so, please file an issue along with steps to reproduce. also link to this forum topic. We'll fix in the next release

thanx

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: Possible bug and fix: Maling Labels in 3.1 now prints contacts w/o adresses too
March 27, 2010, 08:26:00 pm
This bug is of concern to me too.

I have verified it on the Demo site and created an issue here:
http://issues.civicrm.org/jira/browse/CRM-6025
Try CiviTeacher: the online video tutorial CiviCRM learning library.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Possible bug and fix: Maling Labels in 3.1 now prints contacts w/o adresses too

This forum was archived on 2017-11-26.