Some Parsing Errors Showing Up


#1

While using the Form Generator Update, errors started showing up. When I looked under the ‘hood’ there were multiple parsing errors showing up on two input fields, business_address_1 and business_address_2. Any update to these fields would remove the existing data (see images below).

For some reason the Generator is adding a space between the business_ and address. This is causing these fields to be ignored due the a mismatch of the field name.

You see that Underline characters were added. I have no idea why… or why there are escapes before quotes in the $_POST


#2

Please remind me not to have what you are having :joy:.

Back to business. What do the field names in your database look like? Can you show a screen shot similar to


#3

Hello Ben!

I checked them and they were fine. Here they are below:


#4

I’m going to go with another page from scratch and see what happens.

After finishing the list and then moving to generating the form, BAM! it did it again.

Interestingly, this wasn’t happening until the latest software update 1.8.1


#5

It looks like the underscore is what’s causing the problem. I have had similar problems with underscores in the past with other implementations. My lesson has been learned and I use exclusively CamelCase for all of my field names. Problems solved.

Edit: Yep, it could be a bug, in fact I do believe that it is a bug.


assigned patrick #6

#7

I’ve used both camels and underscores; but I must say, that the majority of the time, it’s been _'s. For me, I’ve just found _'s a bit easier for me to read.

I’m going to reinstall the 1.8.1 upgrade and see if it continues this foolishness afterward.


#8

I have alerted Patrick to the problem. It is close to 5:00am in the Netherlands so give him a few hours to open his eyes :sleepy:


#9

Some of the updates included…

Thank you very much Ben.

No problem though… I’m heading off to slumberland myself. It’s almost 11 pm in The Bahamas.


#10

What’s really weird is even the placeholder is putting that extra space.

Plus it appears that it is changing this: sc_business_detail.data.detail_business[0].business_address_2 TO this: sc_business_detail.data.detail_business[0][‘business_address_2’], which renders an error: “message”: “Array to string conversion”, “trace”: "#0 [internal function]: exception_error_handler(8, 'Array to string…'


#11

It is not the underscore that is causing the problem, it is the space character that you have in the id/name of the input. Was this generated by the Form generator or did you insert them?


#12

It was generated. I rebuilt the page four times, each with the same result. However, it only happened with the two address fields, i.e, business_address_1.


#13

How are those fields named in your database? with spaces?

we removed the cleaning up because of other requests like from @Dave but seems we have to add it back to at least the naming of the id fields in the form generator


#14

This is a good compromise for us as all our id fields are lowercase. URL Variables in our case have always been lowercase, sessions a mixture, cookies also lowercase. We always appreciate and respect your decisions George.


unassigned patrick #15

assigned George #16

#17

No spaces anywhere. I only use camels and underscores. :grinning:


#18

Could you send a screenshot of the Bootstrap 4 Form Generator - when you are inspecting the form and you see a list of all fields in there


#19

Here’s the screenshot view…


#20

Did you already fix your spaces problem? As I don’t see any spaces …