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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Name badge with logo doesn't work
Pages: [1]

Author Topic: Name badge with logo doesn't work  (Read 1895 times)

patricr

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
Name badge with logo doesn't work
August 28, 2010, 07:19:27 am
Upgraded from 3.1.5 to 3.2.1, and the name only badge works great.

The name badge with logo gives this output to the  browser when go is pressed:
==========================
format = array('name' => 'Sigel 3C', 'paper-size' => 'A4', 'metric' => 'mm', 'lMargin' => ($pw-$w*2)/2, 'tMargin' => ($ph-$h*5)/2, 'NX' => 2, 'NY' => 5, 'SpaceX' => 0, 'SpaceY' => 0, 'width' => $w, 'height' => $h, 'font-size' => 12); $this->lMarginLogo = 20; $this->tMarginName = 20; // $this->setDebug (); } public function generateLabel($participant) { $x = $this->pdf->GetAbsX(); $y = $this->pdf->GetY(); $this->printBackground (true); $this->pdf->SetLineStyle(array('width' => 0.1, 'cap' => 'round', 'join' => 'round', 'dash' => '2,2', 'color' => array(0, 0, 200))); $this->pdf->SetFontSize(8); $this->pdf->MultiCell ($this->pdf->width-$this->lMarginLogo, 0, $this->event->title ,$this->border,"L",0,1,$x+$this->lMarginLogo ,$y); $this->pdf->SetXY($x,$y+$this->pdf->height-5); $date = CRM_Utils_Date::customFormat($this->event->start_date, "%e %b"); $this->pdf->Cell ($this->pdf->width, 0, $date ,$this->border,2,"R"); $this->pdf->SetFontSize(15); $this->pdf->MultiCell ($this->pdf->width,10, $participant['first_name']. " ".$participant['last_name'] ,$this->border,"C",0,1,$x ,$y+$this->tMarginName); $this->pdf->SetFontSize(10); $this->pdf->MultiCell ($this->pdf->width, 0, $participant['current_employer'] ,$this->border,"C",0,1,$x,$this->pdf->getY()); } } ?>
=================
So- no pdf is created, just this text above in the browser.

I have just upgraded to 3.2.2 in hopes this would fix itself with all new files. It didn't.

Is this a database problem, since that didn't change during the upgrades?
« Last Edit: August 31, 2010, 05:30:20 pm by peterd »

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: Name badge with logo doesn't work
August 28, 2010, 07:49:11 am

the logo.php did not seem well formatted and i fixed it. you can try replacing it from svn:

http://svn.civicrm.org/civicrm/branches/v3.2/CRM/Event/Badge/Logo.php

if you are not sure how to do the above, please wait for 3.2.3 which will be out in a few weeks

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

patricr

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
Re: Name badge with logo doesn't work
August 28, 2010, 08:53:54 am
Thanks. I will try that.

It is odd, though, I have 2 CiviCRM intalls, each now running 3.2.2. One makes the logo name badge fine, the other does not.

The one that does not was migrated from a MAMP server to a OSX 6.2.4 server. I have been looking over the database and all the resource URLs, and they seem fine.

One place in the database, exported as a CSV file shows this:

111   Name Only     1   CRM_Event_Badge_Simple           NULL    NULL
111   Name Tent     2   CRM_Event_Badge_NameTent   NULL           NULL
111   With Logo     3   CRM_Event_Badge_Logo           NULL           0

I note that the name badge has a zero where the others have a NULL.

patricr

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
Re: Name badge with logo doesn't work
August 28, 2010, 09:14:33 am
Fixed! That code change did it!

Thanks so much.

jeremy84olsen1

  • Guest
Re: Name badge with logo doesn't work
August 31, 2010, 04:31:38 am
Thanks for the same.I tried it and yes it works.

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: Name badge with logo doesn't work
August 31, 2010, 05:38:00 pm
not sure it this is out of order, but i modified the first post to a
thumbs up
to indicate that this is now good
does that seem a useful approach to try and make the forum a bit more helpful?
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

patricr

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 0
Re: Name badge with logo doesn't work
August 31, 2010, 05:42:30 pm
Thanks, that's OK. It turned out that the PHP version on one server was 5.3 and the other was 5.2. The 5.3 didnot like the legacy PHP code.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Name badge with logo doesn't work

This forum was archived on 2017-11-26.