6

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&amp ;q=civicrm/contact/imagefile&amp ;photo=0008_51c4b981d854da8af05e187aa199952b.jpeg

with &amp ; (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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.