Forums

strlen() expects parameter 1 to be string, array given event.php on line 25

mholberg 11 May, 2015
Hello,

I found 2 threads similar to what my problem is.
Event error if no Label
CF5 Events event.php index value undefined

However, my form saves fine using placeholders instead of labels for my form elements and having a html render form in the setup. Then, when I add an email action in the setup and try to save, I get the error:

"PHP Warning: strlen() expects parameter 1 to be string, array given in /public_html/administrator/components/com_chronoforms5/chronoforms/events/event.php on line 25."

Is this the same issue?
GreyHead 12 May, 2015
Hi mholberg,

The simple fix is to set Site Error Reporting to System Default or to None as that will hide PHP Notices and Warnings which are usually irritating but not harmful.

I can't see what would cause this particular one as I wouldn't expect an element label to be an array, the line where the message shows appears to be trimming the label length to 60 characters.

Bob
mholberg 12 May, 2015
Hello Bob,

You are right. This is a completely different problem. And very confusing...

These are the steps I used to reproduce my problem on the 2 sites I have Chronoforms5 installed:

1. in designer added "Text Box"
2. in designer added "Dropdown"
2. in setup added "HTML (Render Form)"
3. saved
4. in setup added "Email"
5. saved -> produces 404 error (no entries in error_log file)
6. in designer removed "Dropdown"
7. saved -> success
8. in setup added "Email"
9. saved -> success
10. in designer added "Dropdown"
11. saved -> success
12. in setup removed "Email"
13. saved -> success
14. in setup added "Email"
15. saved -> 404 error

I could work around this somehow with following a certain order of adding elements/events and saving but it would be too tedious. Will install Chronoforms4 and use both version 4 and 5 until perhaps I figure out what's going on. Perhaps the issue lays with the setup of those two sites...

A note on something different. The Styles->Form Theme selection ONLY works if there is an HTML (Render Form) in the setup. Otherwise it appears that bootstrap is the default. The bootstrap theme produces output enclosed with <div class="gbs3"></div>. Since that interfered with bootstrap element I created through code I had to find how to make the theme selection (which I needed set to "none") stick. My first solution was a modification of app_j.php in public_html/libraries/cegcore/libs - far from ideal. Just really happy that I figured it out finally.

Thank you,
Micha
This topic is locked and no more replies can be posted.