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) »
  • Event registration (requiring approval) gets stuck on 4.4.0
Pages: [1]

Author Topic: Event registration (requiring approval) gets stuck on 4.4.0  (Read 1447 times)

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Event registration (requiring approval) gets stuck on 4.4.0
November 05, 2013, 06:33:09 am
I have events that require participant approval. However, when a prospective participant tries to register under Civi 4.4.0, it just gets stuck on the first event registration screen. The participant enters name/address/email and presses Continue but it just stays on the same screen. There's nothing in the error log, so it's hard to see what's going wrong.

I can register a participant from the admin panel fine, and it works if I deactivate the participant approval requirement.

I'm wondering whether there's a problem with the registration form thinking that the registrant needs to select a payment type, although this has been deactivated for events requiring approval.

Any ideas? ???

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Re: Event registration (requiring approval) gets stuck on 4.4.0
December 05, 2013, 04:55:43 am
Ok, this is still a problem for me on 4.4.2, so I've done some more digging.

Seems like the problem is with these new lines (844-846) of code in civicrm/CRM/Event/Form/Registration/Register.php from 4.4.0 onwards:
Quote
      if ($fields['amount'] > 0 && !isset($fields['payment_processor'])) {
       $errors['payment_processor'] = ts('Please select a Payment Method');
      }

If I comment these lines out, then the first stage of approval works fine. So I'm wondering whether this if statement also needs to include a check for whether the event requires approval. It seems like the code is saying "please select a Payment Method", but for the first stage of registration where approval is required, the person is unable to select a payment method, so they are unable to proceed beyond this screen.

Can anyone provide a patch to fix this, please?

I'm happy to raise an error.

pratik.joshi

  • I’m new here
  • *
  • Posts: 9
  • Karma: 2
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: Event registration (requiring approval) gets stuck on 4.4.0
December 07, 2013, 03:38:35 am
Hi Stuart,

Thanks for spotting this bug and tracing it down.

Can you please try the below fix patch if it works for you  :
 
Code: [Select]
diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php
index b30edc7..3e785fd 100644
--- a/CRM/Event/Form/Registration/Register.php
+++ b/CRM/Event/Form/Registration/Register.php
@@ -841,7 +841,7 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
     }
 
     if ($self->_values['event']['is_monetary']) {
-      if ($fields['amount'] > 0 && !isset($fields['payment_processor'])) {
+      if (empty($self->_requireApproval) && $fields['amount'] > 0 && !isset($fields['payment_processor'])) {
         $errors['payment_processor'] = ts('Please select a Payment Method');
       }
       if (is_array($self->_paymentProcessor)) {


Thanks,
Pratik.

pratik.joshi

  • I’m new here
  • *
  • Posts: 9
  • Karma: 2
  • CiviCRM version: 4.4.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.34
  • PHP version: 5.3.10
Re: Event registration (requiring approval) gets stuck on 4.4.0
December 07, 2013, 03:44:38 am
filed issue for this : http://issues.civicrm.org/jira/browse/CRM-13926

Stuart Parker

  • I post occasionally
  • **
  • Posts: 64
  • Karma: 2
  • CiviCRM version: 4.5.2
  • CMS version: Drupal 7
  • MySQL version: 5.1.63
  • PHP version: 5.2.14
Re: Event registration (requiring approval) gets stuck on 4.4.0
December 09, 2013, 02:40:27 am
Hi Pratik

I've tried your patch and it works.  ;D

Thanks for the patch and filing the issue.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Event registration (requiring approval) gets stuck on 4.4.0

This forum was archived on 2017-11-26.