40 Posts
yoyoxp
6 years ago
4
Topic

Hi,

I have a Select Multiple field in which I am storing the key/value pairs as JSON format in the DB. This works fine, when I var_dump the cck object the key and value arrays are returned just like I'd expect, value returning they key which is what I want.

The problem is I cannot use this field within Search form to filter items based on choices made. When I try to filter using the stored information I get a SQL error, with no real hint as to the cause of the issue:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY t2.myordering ASC LIMIT 8' at line 7


In the DB, the field is stored like:

{"name-i-defined":"key"}

My field configuration is:

JSON-FREE-fieldName[name-i-defined]

(I also tried Article storage instead of Free with no change)

I do notice the error does not occur only for my own custom field, but also one seblod includes e.g: Show Author - Select Simple field. The same issue is occur.

I set the Matching as "Any Words Exact", with correct seperator specified as my field uses ','.  But I tried other matching options and not one of them works except for 'None', which obviously isn't much help :).

Thanks for the help,

Nikck

Get a Book for SEBLOD
40 Posts
yoyoxp
6 years ago
0
Level 1

Just to update: I can confirm the issue also occur when using the "Show Author" Select - Simple field on a brand new Joomla/Seblod installation. This looks like a Seblod problem.

Nick

40 Posts
yoyoxp
6 years ago
2
Level 1

Hi all,

Is there any update on this issue?

4229 Posts
Kadministrator
6 years ago
1
Level 2

Search is not implemented yet for json storage. You can use comma separated values to store select multiple fields.

40 Posts
yoyoxp
6 years ago
0
Level 3

Thanks Klas, is this limitation documented? I'll go ahead with using comma separated values instead.

Get a Book for SEBLOD