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) »
  • Custom Field Error on Event Registration. Version 4.3.1 with WordPress
Pages: [1]

Author Topic: Custom Field Error on Event Registration. Version 4.3.1 with WordPress  (Read 1892 times)

KilakwaBT

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 11
  • CiviCRM version: 4.5.5
  • CMS version: WordPress 4.1
  • MySQL version: 5.1.68
  • PHP version: 5.3
Custom Field Error on Event Registration. Version 4.3.1 with WordPress
April 23, 2013, 07:15:33 am
I am getting the following when I add custom fields to a registration form. This error comes up if the form is submitted without all the required fields complete. Also it seems to be related to fields that are a series of check boxes. Alpha Numeric fields don't seem to be an issue. Here are the errors:

Warning: explode() expects parameter 2 to be string, array given in <site home folder>/public_html/news/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php on line 1429

Warning: Invalid argument supplied for foreach() in <site home folder>/public_html/news/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php on line 1432

I reloaded the file Core/BOA/CustomGroup.php. No change.

Thanks in advance for any guidance.

Yashodha Chaku

  • Forum Godess / God
  • Ask me questions
  • *****
  • Posts: 755
  • Karma: 57
    • CiviCRM
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
April 24, 2013, 12:44:13 pm
can you reproduce it on our demo (http://demo.civicrm.org/)

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

KilakwaBT

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 11
  • CiviCRM version: 4.5.5
  • CMS version: WordPress 4.1
  • MySQL version: 5.1.68
  • PHP version: 5.3
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
April 25, 2013, 02:52:15 pm
Worked fine in demo. Happened in two separate installs on my server. Both were upgraded from previous versions. Could that have something to do with it?

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: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
April 30, 2013, 09:16:43 pm
I get the same thing on my site, which is also an upgraded version.

KilakwaBT

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 11
  • CiviCRM version: 4.5.5
  • CMS version: WordPress 4.1
  • MySQL version: 5.1.68
  • PHP version: 5.3
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
May 02, 2013, 08:17:39 am
I got some time to setup a fresh install on my testing server and the error doesn't occur. Definitely upgrade related. I am going to do some work on my upgraded install to see if I can come up with a fix. If anyone has any thoughts please let me know.

Thanks

BT

teleute

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.3.1
  • CMS version: Joomla
  • MySQL version: 5.1.53
  • PHP version: 5.3.13
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
May 03, 2013, 04:38:42 pm
I just got the exact same thing on a non-upgraded site.  (No Wordpress link, however - it's installed as a Joomla component.)

KilakwaBT

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 11
  • CiviCRM version: 4.5.5
  • CMS version: WordPress 4.1
  • MySQL version: 5.1.68
  • PHP version: 5.3
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
May 04, 2013, 05:27:52 am
I am getting the error on the new install. In my earlier test I forgot to leave a required field blank. If I do that I get the error. Only with check boxes though. Radio Buttons & Select Lists are working fine.

KilakwaBT

  • I post occasionally
  • **
  • Posts: 101
  • Karma: 11
  • CiviCRM version: 4.5.5
  • CMS version: WordPress 4.1
  • MySQL version: 5.1.68
  • PHP version: 5.3
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
May 04, 2013, 06:22:40 am
I think I have found the issue.

I went into the file: <site home folder>/public_html/news/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/CustomGroup.php
On line 1424 is the following:           if ($field['html_type'] == 'CheckBox' ||

I added a space after the x in Checkbox and everything works fine. I don't have time to check in another install right now. Will try later. Something to look for.

BT

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
June 02, 2013, 11:05:17 am
I have same error on 4.3.3 Drupal:
Location   https://xxx.com/civicrm/event/register
Referrer   https://xxx.com/civicrm/event/register?id=542&reset=1
Message   Warning: explode() expects parameter 2 to be string, array given in CRM_Core_BAO_CustomGroup::extractGetParams() (line 1429 of /home/xxx/public_html/drupal/sites/all/modules/civicrm/CRM/Core/BAO/CustomGroup.php).


code:
 if ($field['html_type'] == 'CheckBox' ||
            $field['html_type'] == 'AdvMulti-Select' ||
            $field['html_type'] == 'Multi-Select'
          ) {
            $value        = str_replace("|", ",", $value);
            $mulValues    = explode(',', $value);

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
June 13, 2013, 08:17:12 am
According to CRM_Utils_Request Class Reference
Returns "mixed the value of the variable public" but explode(',', $value); expects a string.  the error seems to indicate a value is returned.

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Custom Field Error on Event Registration. Version 4.3.1 with WordPress
June 13, 2013, 08:20:58 am
Note - i logged a bug:  CRM-12811 - Error parsing Custom Group from Form due to wrong type

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Custom Field Error on Event Registration. Version 4.3.1 with WordPress

This forum was archived on 2017-11-26.