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) »
  • Errors when trying to register
Pages: [1]

Author Topic: Errors when trying to register  (Read 2995 times)

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Errors when trying to register
August 27, 2008, 10:24:07 pm
When you click on the button to register, these errors are showing up:



    * warning: array_keys() [function.array-keys]: The first argument should be an array in /home/username/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration.php on line 432.
    * warning: Invalid argument supplied for foreach() in /home/username/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration.php on line 432.
    * warning: Invalid argument supplied for foreach() in /home/username/public_html/sites/all/modules/civicrm/CRM/Event/Form/Registration.php on line 439.


Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Errors when trying to register
August 28, 2008, 12:55:41 am
Could you replicate the same on http://drupal.demo.civicrm.org/ ?

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

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: Errors when trying to register
August 28, 2008, 02:48:12 am
Which version of CiviCRM are you using?

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!

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: Errors when trying to register
August 28, 2008, 01:35:36 pm
We're using 2.0.5.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: Errors when trying to register
August 28, 2008, 04:26:28 pm
Just upgraded to 2.0.6 and it still does it.

I'll go and input everything from the event over at the demo site. Hopefully it's using the same version we are.

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: Errors when trying to register
August 28, 2008, 04:41:12 pm
The demo site is running 2.1, and we haven't upgraded to that since it isn't a stable version yet. As such, I can't test on the site.

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: Errors when trying to register
August 29, 2008, 12:55:09 am

can u replicate the issue on 2.1 using a similar profile etc.

You might also want to try applying this patch:

Code: [Select]
bash-3.2$ svn diff -r PREV CRM/Event/Form/Registration.php
Index: CRM/Event/Form/Registration.php
===================================================================
--- CRM/Event/Form/Registration.php     (revision 16897)
+++ CRM/Event/Form/Registration.php     (working copy)
@@ -436,16 +436,17 @@
             if ( $contactID ) {
                 if ( CRM_Core_BAO_UFGroup::filterUFGroups($id, $contactID)  ) {
                     $fields = CRM_Core_BAO_UFGroup::getFields( $id, false, CRM_Core_Action::ADD );
-                   
                 }
             } else {
                 $fields = CRM_Core_BAO_UFGroup::getFields( $id, false, CRM_Core_Action::ADD );
             }
-           
-            // unset any email-* fields since we already collect it, CRM-2888
-            foreach ( array_keys( $fields ) as $fieldName ) {
-                if ( substr( $fieldName, 0, 6 ) == 'email-' ) {
-                    unset( $fields[$fieldName] );
+
+            if ( is_array( $fields ) ) {
+                // unset any email-* fields since we already collect it, CRM-2888
+                foreach ( array_keys( $fields ) as $fieldName ) {
+                    if ( substr( $fieldName, 0, 6 ) == 'email-' ) {
+                        unset( $fields[$fieldName] );
+                    }
                 }
             }

the line numbers are from 2.1, but there exists a similar section of code in 2.0

thanx

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

jsimonis

  • I post frequently
  • ***
  • Posts: 316
  • Karma: 4
    • Forward Support, Inc.
  • CiviCRM version: 4.4-4.5
  • CMS version: Drupal 7
  • MySQL version: 5.5.37-cll
  • PHP version: 5.3.29
Re: Errors when trying to register
August 29, 2008, 11:38:10 pm
I'll go in and try it.

We're also not getting the information that is inputted into the fields in the email. Instead, we get this:

===========================================================
individual_prefix : Array
first_name : Array
last_name : Array
job_title : Array
organization_name : Array

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: Errors when trying to register
August 30, 2008, 12:56:45 am

can u remove organization_name from the profile and give it a shot. if it still does not work, remove job_title, and after that individual_prefix

thanx

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

arts4la

  • Guest
Re: Errors when trying to register
September 02, 2008, 03:17:48 pm
I figured this out - we had included an organizational profile field in our registration  I removed it and added the "Employee Of" and it seems to be working just fine now.  Thanks for looking into this.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Errors when trying to register

This forum was archived on 2017-11-26.