Checkbox element storing values with brackets and quotes

Status
Not open for further replies.
When a storing values from a checkbox element (field type text in mysql), I am getting entries in the database such as this: ["Retail Shop","Market"]

Why the brackets and quotes?

The problem is that on the list filter ["Market"] is showing up as a choice. The rest of the choices are okay (without brackets and quotes). When selecting the ["Market"]

Addtional info: I created a value with a forward slash (Bars/Pubs), not knowing that mysql would have a problem with that. This also shows up with the brackets and quotes in the filter in the list.

URL: ciderweekny.com/locations
Joomla: 2.5.6
 
Why the brackets and quotes?
This is the data format we store checkboxes selection in, its call JSON (javascript object notation).

The problem is that on the list filter ["Market"] is showing up as a choice.
That would suggest to me that you might no longer have "Market" set up as a value in the checkbox elements options? Could you confirm if that is the case?

Addtional info: I created a value with a forward slash (Bars/Pubs), not knowing that mysql would have a problem with that.
This was a bug, if you update from github, you should now be able to filter on values stored with slashed in them.

This also shows up with the brackets and quotes in the filter in the list.
I didn't see this when testing, again could it be that you had saved some records with this value an then removed the option from the element sub options?

-Rob
 
I do have market setup in the checkbox options.

I have gone through all of the records and resaved. I switched Bar/Pub to Bar or Pub to avoid the slash problem. Even after resaving all records, I still have [["Bar or Pub"]] and [["Market"]] showing up in the filter drop down. Anything else I can try?
 
I'm out of simple suggestions.
Can you PM me:

* An ftp account to your site
* The URl where I can see the list with the issue
* An admin login
* If possible phpMyAdmin access (so I can double check what is actaully being stored)

-Cheers
Rob
 
hmm I didn't have any luck logging into the admin I get this message:
"You do not have access to the administrator section of this site."

and the ftp fails as well ;( I tried using ftp and sftp

Could you double check them please?
thx
Rob

ps an export of the db would certainly help
 
Sorry about that. Fixed the credentials in another PM. What is the best way to upload the database? Didn't see a way to do it in the PM.
 
I've fixed this on your site (just altering models/element.php to fix it.
The same fix has also been applied in github
 
Thanks, Rob. The brackets are fixed, but now the filter associated with the cascading drop down field "town/borough" and the database join field "region" is not working. The region and town/borough values are in the detailed record view, and the selection appears to work when creating a new or editing an existing record, but the filter for these two fields on the following page does not load: ciderweekny.com/locations
 
I've tried replicating this on my test sites, no luck.

If Rob doesn't get to this today, I'll need to get access to the site and take a look for you.

-- hugh
 
Maybe I should clarify. The filter drops down but only shows "All" for "region/city" and "Please Select" for "town/borough." The records do have values in those fields. Those fields are handled with a cascading drop down. The filters listed all of the options before.

Should I send you a pm with login credentials?
 
can you send them to both of us, the ftp details i have for the site seem to no longer work

thx
Rob
 
I just update the element.php model file which seemed to resolve the empty dropdown list filter

You may want to edit the list so that the 'filter trigger' is set to 'submit button' rather than 'on change' as you need to really select a region then a town before applying the filter
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top