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) »
  • Event registration: hangs on Processing: if too many line items/profile fields
Pages: [1]

Author Topic: Event registration: hangs on Processing: if too many line items/profile fields  (Read 1124 times)

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Event registration: hangs on Processing: if too many line items/profile fields
January 17, 2013, 01:47:13 pm
If the Table (th = Event Information and Location) within the Table (id = crm-event_receipt) becomes too large to be printed on (in our case) one piece of 8.5 x 11in. paper then Event registration hangs on Processing... IF Attach PDF copy to receipts: Yes.

Switching Attach PDF copy to receipts: No - everything Processes fine.

If you have an Event with: event information and location, event contacts, help spread the word section, price set: 3 check box options, profiles: Your Registration Info and Name and Address - nothing too complex but already enough to have a table large enough to more than fill a page.

I reproduced it on CiviCRM 44878 (locally). Took a closer look at CRM/Utils/PDF/Utils.php

dompdf does naturally break Table elements - and it does - also in our case:

Dear Name.. etc Thank you for registration for: etc

gets printed on p1 of the PDF - and the Table "Event Information and Location" gets printed on p2 (as it is too large to also fit on p1).

But the issue is that the Table within the first Table - doesn't auto-page-break.

I found CSS page-break-inside Property - but that only works for Opera - and even there default is auto.

So I'm thinking perhaps we need to split the Table (id = crm-event_receipt) into two Tables?

-- KarinG


KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: Event registration: hangs on Processing: if too many line items/profile fields
January 19, 2013, 07:11:42 am
So I'm really hoping we can make this (no more <table> within a <table>) the default in all templates that we include with CiviCRM - because it is not going to be obvious that if you would like PDF receipts - that you have to edit your HTML message template so that those users who select more than x number of options from a price set on a (in this case) Event registration page - do not get stuck on Processing... after the Review screen. It took one of my nonprofits two days before they came to me and then another afternoon/evening for me to realize what was happening.

If the <table> within the <table> is restructured - then dompdf has no difficulty printing a table over more than one page [tested/confirmed the patch below is working on CiviCRM 44878] - auto page break works nicely.

Perhaps I should 'move' this from the CiviEvent to the CiviMail board?

eg:

Code: [Select]
--- Events_Registration_Confirmation_and_Receipt_online.txt        2013-01-19 07:49:38.000000000 -0700
+++ new_Events_Registration_Confirmation_and_Receipt_online.txt     2013-01-19 07:48:56.000000000 -0700
@@ -53,9 +53,9 @@
 
    </td>
   </tr>
-  <tr>
-   <td>
-    <table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
+</table>
+
+<table width="500" style="border: 1px solid #999; margin: 1em 0em 1em; border-collapse: collapse;">
      <tr>
       <th {$headerStyle}>
        {ts}Event Information and Location{/ts}
@@ -451,4 +451,3 @@
 
 </body>
 </html>
-

adixon

  • I post frequently
  • ***
  • Posts: 314
  • Karma: 19
    • Blackfly Solutions
Re: Event registration: hangs on Processing: if too many line items/profile fields
January 24, 2013, 05:40:54 am
Have you tried futzing with the style of the inside table?

I agree that this should get fixed before someone else ends up wasting so much time again. You could try opening an issue and posting a patch, if you think this is the best solution.

Simon147

  • I post occasionally
  • **
  • Posts: 96
  • Karma: 3
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.30
  • MySQL version: 5.0.92
  • PHP version: 5.2.9
Re: Event registration: hangs on Processing: if too many line items/profile fields
January 07, 2015, 12:43:11 am
Just ran into this problem too.

Did you after all manage to solve the problem?

Should this be transformed into a bug report?

Simon

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: Event registration: hangs on Processing: if too many line items/profile fields
January 07, 2015, 09:00:41 am

might want to try switching to the wkhtmltopdf library which is a lot faster than dompdf

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

KarinG

  • I post frequently
  • ***
  • Posts: 134
  • Karma: 9
  • CiviCRM version: 4+
  • CMS version: Drupal 6 / 7
  • MySQL version: MariaDB
  • PHP version: 5.3/5.4/5.5
Re: Event registration: hangs on Processing: if too many line items/profile fields
January 07, 2015, 07:31:09 pm
Hi Simon,

My solution has simply been to disable PDFs attached to Emails [for all our clients]. There is really no point - the information is the same as in the Email - which can be printed as well [there is a setting for it: under Misc -> Attach PDF copy to receipts -> default used to be Yes - I think we got that changed to 'nothing' - which is better].

If you like the PDF then the fix is to overwrite it with some custom code to prevent that <table> within a <table>

Or try wkhtmltopdf (as Lobo suggested - always on the mark)

Longer term I really like TCPDF. We use it in our CDN TaxReceipts extension (it easily handles stacks of hundreds (I've seen > 1,000) PDF pages). I use it for any custom PDF generation - like Membership cards with watermarks - Elections Reporting Tax Filing documents printed on embedded government PDF forms. CiviCRM Core is (happy dance) already using TCPDF in some places for example: Event Name Badges. I'm hoping TCPDF will be gradually adopted throughout other sections in CiviCRM.
« Last Edit: January 07, 2015, 07:33:38 pm by KarinG »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Event registration: hangs on Processing: if too many line items/profile fields

This forum was archived on 2017-11-26.