Answers.Body: <p>Image URLs were the subject of a security release in CiviCRM 5.10.3.  My guess is that you've uncovered a bug related to this, especially if they printed in the past.</p>
  
  <p>My recommendation would be to take your test site (I hope you have one!) and revert it to CiviCRM 5.10.2 to see if it resolves the issue.  If so, I would use the test site to print the badges, and report the bug on <a href="https://lab.civicrm.org" rel="nofollow noreferrer">https://lab.civicrm.org</a>, referencing this Stack Exchange question.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-05T16:18:05.680Z
Answers.Text: Looks like it's already on lab.civicrm.org: https://lab.civicrm.org/dev/core/issues/776
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-03-05T16:09:19.033Z
Answers.LastActivityDate: 2019-03-05T16:09:19.033Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I'm trying to use the Name Badges feature to create badges for an NGO I work as a volunteer. So far I was able to set up the badge with the fields I need. Everything seems to be ok but, when I click to generate the PDF with the badges all the fields are there but the contact (participant) image. Even the QR Code is generated and printed.</p>
  
  <p>I tried to debug in all the ways I know and found that, at /wp-content/plugins/civicrm/civicrm/CRM/Badge/BAO/Badge.php the imageURL has indeed the correct image path and file name. </p>
  
  <p>The strange part is that even with the imageURL being correct, the image doesn't show up in the PDF. However, when I tried making imageURL a fixed value the image was printed (obviously, the same image for all participants).</p>
  
  <p>As I ran out of options, would someone point me to any other way to figure out why this happens and how to fix it?</p>
  
  <p>Any help is much appreciated.
  Thanks!</p>
  
  <p>CiviCRM 5.10.4</p>
  
  <p>Wordpress 5.1</p>
  
  <p>--- x ---</p>
  
  <p>Thanks to a user's insight in lab.civicrm, I did some additional investigation and found that in db the imageURL is stored as </p>
  
  <p><a href="http://domain.org/civicrm?page=CiviCRM&amp;amp" rel="nofollow noreferrer">http://domain.org/civicrm?page=CiviCRM&amp;amp</a> ;q=civicrm/contact/imagefile&amp;amp ;photo=0008_51c4b981d854da8af05e187aa199952b.jpeg</p>
  
  <p>with &amp;amp ; (I've added the <em>space</em> here because of the editor) instead of just &amp;</p>
  
  <p>I manually updated one record and the badge was generated with the image. </p>
  
  <p>I can't say this was introduced as part of the update process or not, but a script to fix imageURL will make it work while the root cause is investigated.</p>
  
Tags: <civievent><contact-image>
Title: Can't print participant's image in name badge
ThreadText: # Can't print participant's image in name badge
  
  (Asked by: username_0 on 2019-03-04)
  
  I'm trying to use the Name Badges feature to create badges for an NGO I work as a volunteer. So far I was able to set up the badge with the fields I need. Everything seems to be ok but, when I click to generate the PDF with the badges all the fields are there but the contact (participant) image. Even the QR Code is generated and printed.
  
  I tried to debug in all the ways I know and found that, at /wp-content/plugins/civicrm/civicrm/CRM/Badge/BAO/Badge.php the imageURL has indeed the correct image path and file name.
  
  The strange part is that even with the imageURL being correct, the image doesn't show up in the PDF. However, when I tried making imageURL a fixed value the image was printed (obviously, the same image for all participants).
  
  As I ran out of options, would someone point me to any other way to figure out why this happens and how to fix it?
  
  Any help is much appreciated.
  Thanks!
  
  CiviCRM 5.10.4
  
  Wordpress 5.1
  
  --- x ---
  
  Thanks to a user's insight in lab.civicrm, I did some additional investigation and found that in db the imageURL is stored as
  
  <http://domain.org/civicrm?page=CiviCRM&> ;q=civicrm/contact/imagefile& ;photo=0008\_51c4b981d854da8af05e187aa199952b.jpeg
  
  with & ; (I've added the *space* here because of the editor) instead of just &
  
  I manually updated one record and the badge was generated with the image.
  
  I can't say this was introduced as part of the update process or not, but a script to fix imageURL will make it work while the root cause is investigated.
  
  **Tags:** civievent, contact-image
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-03-05. Score: 4
  
  Image URLs were the subject of a security release in CiviCRM 5.10.3. My guess is that you've uncovered a bug related to this, especially if they printed in the past.
  
  My recommendation would be to take your test site (I hope you have one!) and revert it to CiviCRM 5.10.2 to see if it resolves the issue. If so, I would use the test site to print the badges, and report the bug on <https://lab.civicrm.org>, referencing this Stack Exchange question.
  
  > **Comments:**
  > **username_2**: Looks like it's already on lab.civicrm.org: https://lab.civicrm.org/dev/core/issues/776  
  
  ---
  
  