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 CiviEvent (Moderator: Yashodha Chaku) »
  • Error when clicking on print icon
Pages: [1]

Author Topic: Error when clicking on print icon  (Read 3828 times)

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Error when clicking on print icon
June 03, 2008, 01:59:01 pm
Running Drupal 5.7 with CiviCRM 2.0.3.  I sign up for one of the events I have configured in CiviEvent, and then when I get the thank you page and try printing the thank you /confirmation page using the print icon, I get the following error:

Sorry. A non-recoverable error has occurred.

We experienced an unexpected error. Please file an issue with the backtrace

Return to home page.


Any suggestions on how to make this work?  It gives a printer friendly view of the form (sign up) page without issue, just throws the error on the confirmation page.


Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Error when clicking on print icon
June 04, 2008, 05:09:06 am
Hey,

It looks like a know bug: CRM-2985. Fix for it is available in 2.0.4 - can you please upgrade and let us know if it helped?

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

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: Error when clicking on print icon
June 04, 2008, 11:12:46 am

actually the fix is available in 2.1, not 2.0.4. Its a pretty involved fix, so a backport is not trivial

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

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Error when clicking on print icon
June 04, 2008, 01:02:10 pm
Eh, sorry for my initial wrong information - too many things happening around me today. :-(

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

backdrifting

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 2
Re: Error when clicking on print icon
June 05, 2008, 05:58:10 am
Ok, so if it's a full upgrade to 2.1 that is necessary I can't make this happen during our timetable, so how quickly can I just remove the print icon from the template?  What template do I need to look in for the print icon?

I'll just remove the print icon since it doesn't work in 2.0.3.

-Trevor

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Error when clicking on print icon
June 05, 2008, 07:15:39 am
You can modify templates/common/Drupal.tpl and replace the link to a separate "printer-friendly" HTML page with a javascript link which simply invokes window.print() - which does the same thing as the user selecting Print from the browser's File menu.

Code: [Select]
// Replace this line
<div id="printer-friendly"><a href="{$printerFriendly}" title="{ts}Printer-friendly view of this page.{/ts}"><img src="{$config->resourceBase}i/print_preview.gif" alt="{ts}Printer-friendly view of this page.{/ts}" /></a></div>

// With this line
 <div id="printer-friendly"><a href="javascript:window.print()" title="{ts}Print this page.{/ts}"><img src="{$config->resourceBase}i/print_preview.gif" alt="{ts}Print this page.{/ts}" /></a></div>
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Error when clicking on print icon
June 08, 2008, 05:30:12 am
Wee typo, the file is templates/CRM/common/drupal.tpl

(svn diff attached)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

vqcdesigns

  • Guest
Re: Error when clicking on print icon
June 12, 2008, 07:55:29 am
Would this work in a Joomla install?  Also, what is the correct path to this file in a Joomla installation of CiviCRM?

vqcdesigns

  • Guest
Re: Error when clicking on print icon
June 12, 2008, 08:11:28 am
It is located in templates/CRM/common/joomla.tpl.

I implemented this hack and it works but it prints the ENTIRE website page.  Is there a way just to print the actual confirmation area itself and no other extraneous graphics, etc?
« Last Edit: June 12, 2008, 08:45:04 am by Dave Greenberg »

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Error when clicking on print icon
June 12, 2008, 08:46:27 am
Not without writing some additional code and creating a separate page / template to display it.
Protect your investment in CiviCRM by  becoming a Member!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Error when clicking on print icon
June 12, 2008, 11:13:10 pm
Suggested hack:

Go for a more heavily customised print css and hide all what you don't want.

Basically, if you
{display:none;} about everything and adjust margins, you should have something close enough.

(firebug is your friend to help to identify the elements you want to hide)


X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

vqcdesigns

  • Guest
Re: Error when clicking on print icon
June 13, 2008, 06:38:27 am
Do you know which file(s) I would need to modify to allow for this?  I am not too familiar with the templating system of CiviCRM, although I am very familiar with Joomla's templating system.  Any additional suggestions would be appreciated.  Thanks.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Error when clicking on print icon
June 14, 2008, 01:49:01 am
It depends on your theme (in drupal).

Look at your page source, you have probably in the head a <style type="text/css" media="print">, that's the css file you want to alter.

X+


-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error when clicking on print icon

This forum was archived on 2017-11-26.