Some Parsing Errors Showing Up

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

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.

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.

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:

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.

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…'

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?

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.

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

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.

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

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

Here’s the screenshot view…

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

I did. However, the bs4 form generator has been putting them back in. I’m about to try one more time. If it fails, I will reinstall 1.8.1 and see if that fixes anything.

The previous screenshots of the spaces were on the first note about the issue. I’ve been working on this trying to see if there were any discrepancy with my DB fields and the input fields as well.

A curious thing that was happening was how the generator was changing the dmx-data input to {{$_POST[“business _address_2”]}}. This appears to changing it to a string?

I’ve gone back to the server action UPDATE_BUSINESS and found it had changed there too. I think I have them all cleaned up. So we will give it a go again.

1 Like

I found that it also put a space between business and the underscore in the api file business_update.php:

{
“table”: “business”,
“column”: “business _address_1”,
“type”: “text”,
“value”: “{{$_POST.business_address_1}}”
},
{
“table”: “business”,
“column”: “business _address_2”,
“type”: “text”,
“value”: “{{$_POST.business_address_2}}”
},
{
“table”: “business”,
“column”: “business_city”,
“type”: “text”,
“value”: “{{$_POST.business_city}}”
},

After removing the spaces in address 1 and 2. I now works. Thanks for your patience and work to resolve this.