Support

Home Forums Event Espresso Premium explode() error

explode() error

Posted: July 9, 2012 at 8:22 am


chingy

July 9, 2012 at 8:22 am

Hiya

I have my website setup and part of it asks for the Additional Attendees to answer the addition Question Groups.

When I enable the Full Registration Information under Additional Attendee Registration info the following appears on the event-registration page

Warning: explode() expects parameter 2 to be string, array given in /home/username/public_html/wp-content/plugins/event-espresso.3.1.24.1.P/includes/functions/form_build.php on line 165

I’ve copied the file over from the download and still errors as above.

Thanks

(on an aside, it shows the full registration details correctly – albeit with the above error message)

Thanks


Chris Reynolds

  • Support Staff

July 9, 2012 at 8:34 am

Do any of your questions have a , in them?


chingy

July 9, 2012 at 8:43 am

Thanks Chris, they do in terms of the Drop down options

Eg

Red, Black, Blue


chingy

July 9, 2012 at 8:46 am

The name of the Question Group has commas in them if that helps?


Chris Reynolds

  • Support Staff

July 9, 2012 at 8:54 am

Try renaming your Question Group to remove the commas. Something is throwing off the function by making it think you’re trying to pass an array.


chingy

July 9, 2012 at 9:13 am

Thanks Chris

No joy πŸ™

I changed the Group Name so that it was just a single word and I changed the dropdowns so that there were no spaces in the Dropdown Values but stil getting the same error


Chris Reynolds

  • Support Staff

July 9, 2012 at 9:29 am

I’m not able to reproduce the issue on my dev server. If you remove the dropdown question(s) from the question group, does the warning go away?


chingy

July 9, 2012 at 9:37 am

Thanks Chris

When I uncheck the Group, the message disappears (and of course the additional question disappears too).

(thanks for your help with this – you guys at EE are awesome).


Josh

  • Support Staff

July 9, 2012 at 9:40 am

@chingy, is error_display set to yes in php.ini? check the phpinfo() on the server (there are WP plugins that will print out the phpinfo() right in the wp-admin_

phpinfo

If so, set this to off. Note this shouldn’t be turned on for a production site: php.ini


Chris Reynolds

  • Support Staff

July 9, 2012 at 9:44 am

(that should be phpinfo() not php_info() πŸ™‚ )

My concern was more the cause of the error itself, though maybe it’s just that this is a certain former developer’s horrible spaghetti code…

  • This reply was modified 11 years, 9 months ago by  Chris Reynolds.
  • This reply was modified 11 years, 9 months ago by  Chris Reynolds. Reason: my >.< emoticon was cutting off at the end of the line... >


chingy

July 9, 2012 at 9:49 am

Just to flag a more serious issue.

I hope this makes sense.

If I set Additional Attendee Registration info? to = Personal Information Only

  • It works fine.
  • It doesnt show any additional questions
  • It goes to the Payment options page ok

If I set Additional Attendee Registration info? to = Full Registration Information

  • The error as mentioned before displays on the additional attendees
  • It DOES show the additional questions
  • It actually BYPASSES the Payment options page and makes it a CONFIRMED registration (even though payment has not been made)


chingy

July 9, 2012 at 9:51 am

Thanks guys.

Weirdly, the one I am working on at the moment (with the issues) is a mirror of a site we’re doing before we switch over from the old site. The old site itself is running on version 3.1.15 P and seems to be working ok.


chingy

July 9, 2012 at 9:54 am

Thanks @josh – not sure how I might be able to check if the error_display is on or off?

My only experience so far of php.ini is creating one on the server when one didnt exist and adding some code in there to increase the file upload size for WordPress.


chingy

July 9, 2012 at 10:00 am

Ah ok. I thought I would experiment a bit.

I took the version of includes/functions/form_build.php from my old setup and uploaded it over the one with the issue and the error disappeared (not yet tested to see if it works yet).

Not sure how to explain it on here, as I cant upload files but I will see if I can compare the files


Josh

  • Support Staff

July 9, 2012 at 10:03 am

http://wordpress.org/extend/plugins/wordpress-php-info/

I don’t recommend mixing code from an old version of Event Espresso into a newer one.


Chris Reynolds

  • Support Staff

July 9, 2012 at 10:06 am

You can try adding this to your functions.php to disable strict mode:

 /**
  * disable php strict mode
  * @author Chris Reynolds
  * @link http://stackoverflow.com/questions/1248952/php-5-disable-strict-standards-error
  * disables strict mode but logs messages
  */
 function disable_strict() {
    ini_set('display_errors', '0');     # don't show any errors...
    error_reporting(E_ALL | E_STRICT);  # ...but do log them
 }
 add_action ('after_setup_theme', 'disable_strict', 0);

I’ve actually got this running on this site.


chingy

July 9, 2012 at 10:07 am

Thanks, no I was hoping to see if it would help isolate the issue.

I uploaded the files online.

Here is the one causing bugs:
http://www.text-upload.com/read,3881007299051

And here is the one which is working ok (from an previous version of EE)
http://www.text-upload.com/read,3881017936182

Hope it helps? πŸ™‚


Chris Reynolds

  • Support Staff

July 9, 2012 at 10:09 am

There were changes made to that file between 3.1.15 and 3.1.24, but this is the first problem as a result that I’ve heard of. I will do some testing locally and see if I can duplicate the issue with strict mode on.

In the meantime, try adding the code I posted above to your functions.php file.

  • This reply was modified 11 years, 9 months ago by  Chris Reynolds. Reason: added temporary fix


chingy

July 9, 2012 at 10:11 am

Thanks Chris

That looks like its hidden it – is it safe for me to continue with this? Not sure how we find out about any bugs if its not on? πŸ™‚


Josh

  • Support Staff

July 9, 2012 at 10:16 am

You should still be able to see errors and warnings in the server’s error log.


chingy

July 9, 2012 at 10:24 am

‘fraid to say that I’ve no idea what that is haha


Chris Reynolds

  • Support Staff

July 9, 2012 at 10:56 am

If there’s a fatal error on the page, your page won’t load at all, you’ll just get a white screen or an Internal Server Error. And in that case, this function would be handy, because you could just comment out the last line like so:

//add_action ('after_setup_theme', 'disable_strict', 0);

and then you can see what’s causing the error.

Everything else is just notices and warnings, which — with the code added above — will get appended to the php.log that is stored on your server. If you don’t have immediate access to your error logs (or don’t know where they are or how to get to them) you can contact your host and they should be able to help you out there.


chingy

July 9, 2012 at 11:11 am

Thanks.

I’ve just noticed another issue which I’ve found which I hope you could help with. Not sure if i should post here or create a new thread.

Doing a test purchase, and when I select THREE ATTENDEES (one with two additionals guests) I have it set up that all attendees need to complete the questions.

But I’ve noticed that the second person in my screenshot isnt asked πŸ™

screenshot

  • This reply was modified 11 years, 9 months ago by  Chris Reynolds. Reason: fixed screenshot :)


Josh

  • Support Staff

July 9, 2012 at 11:17 am

Try setting “Full registration information” for the additional attendees, then check off the group for the additional attendees. If this additional question is in the personal information group, move it to its own group.


chingy

July 9, 2012 at 11:18 am

Lets try this screenshot again enter image description here


chingy

July 9, 2012 at 11:23 am

Thanks Josh. Think thats fixed it. The question is in its own group (and its teh same question for the Primary Attendee


chingy

July 9, 2012 at 11:33 am

Hiya guys

Just to highlight a more serious issue πŸ™

If I set Additional Attendee Registration info? to = Personal Information Only

  • It takes the user to the Payment options (which is good)

If I set Additional Attendee Registration info? to = Full Registration Information

  • It BYPASSES the Payment options page and sets it to be a CONFIRMED registration (even though payment has not been made)
  • This reply was modified 11 years, 9 months ago by  chingy.


Josh

  • Support Staff

July 9, 2012 at 12:49 pm

I’m not able to reproduce this on my test installation. Check your payment settings in Event Espresso>payment settings and make sure that the bypass payment overview page option is set to no. Then check the default payment status in Event Espresso>General settings and the default payment status for the event. These should be set to either pending or incomplete.


chingy

July 9, 2012 at 12:52 pm

Thanks Josh

I’ve checked the settings and its

  • Default Payment Status = Incomplete
  • Bypass Payment Overview Page = No

Its incredibly odd, but the above bit I mentioned about the user info seems to affect it πŸ™


Josh

  • Support Staff

July 9, 2012 at 1:02 pm

Which payment options are active?


chingy

July 9, 2012 at 1:02 pm

I only have INVOICE PAYMENT SETTINGS and PAYPAY SETTINGS


chingy

July 9, 2012 at 1:03 pm

I only have INVOICE PAYMENT SETTINGS and PAYPAY SETTINGS


chingy

July 9, 2012 at 1:04 pm

I only have INVOICE PAYMENT SETTINGS and PAYPAY SETTINGS enabled


Josh

  • Support Staff

July 9, 2012 at 1:06 pm

Try deactivating all non-ee plugins, and if that does not help, try uploading a fresh copy of Event Espresso. I’m not able to reproduce this on two installations. (one is using PayPal, the other is using Invoice)


chingy

July 9, 2012 at 1:14 pm

OK, will try that. Quick question also, but with my account homepage I have some shortcuts to the downloads. I purchaesed the Multi registration addon, is it possible to get that link too – just in case theres an updated version?

Thanks


Josh

  • Support Staff

July 9, 2012 at 1:30 pm

It’s possible, you’ll need to fill out an update request form: https://eventespresso.com/contact/update-request/


chingy

July 9, 2012 at 1:31 pm

Thanks!

The support post ‘explode() error’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso