151 Posts
jimenaes
7 years ago
11
Topic

Hello

Since the last  Seblod upgrade all my dynamic fields wich uses free query stop working, they don't write the value on the search query.

Is this a known issue?

Thanks

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
0
Level 1

Is this resolved?

45 Posts
Jan
7 years ago
9
Level 1

Hello All,

I can not get the search query of dynamic fields with a free sql query to work again after upgrading to Seblod 3.15. If this is resolved, I will be glad to know how.

Greetings

4229 Posts
Kadministrator
7 years ago
8
Level 2

How does you query look like and do you get an errors?

45 Posts
Jan
7 years ago
7
Level 3

Hello Klas, thanks for your attention.

This is one of my queries:

SELECT DISTINCT sort_eb FROM jn_cck_store_form_eb_verk
INNER JOIN jn_content
ON jn_content.id=jn_cck_store_form_eb_verk.id
WHERE catid=11
ORDER BY sort_eb ASC;

I don't get any errors.

1283 Posts
Bucklash
7 years ago
1
Level 4

Hi

Have you tried your query like this, ie define which table catid comes from:

SELECT DISTINCT a.sort_eb 

FROM #__cck_store_form_eb_verk AS a

INNER JOIN #__content AS b

ON b.id = a.id 

WHERE b.catid=11

ORDER BY a.sort_eb ASC;
4229 Posts
Kadministrator
7 years ago
0
Level 5

If Bucklashe's version doesn't work there is something wrong with query/data conent e.g. there is no records with catid 11

45 Posts
Jan
7 years ago
4
Level 4

Thanks Bucklash, your version don't work. No Klas, there is nothing wrong with my query or my data.

Working on localhost, I have compared the working of select dynamic in several versions of Joomla and Seblod. Select dynamic works fine in Joomla 3.6.5 and 3.7.0 untill Seblod 3.11. When I replace select_dynamic.php in Seblod 3.11 by the version of that file in Seblod 3.10, my queries work again.This hack works in Joomla 3.8.1 and Seblod 3.15 to.

4229 Posts
Kadministrator
7 years ago
3
Level 5

I just tested and select dynamic works fine for me. Please explain what kind of the problem you are getting, it is not exactly clear whether you options are blank or what exactly is the problem. 

4229 Posts
Kadministrator
7 years ago
2
Level 6

I located your problem, you are not using AS text and AS value in your query. For security purposes variables passed to search query get checked against all possible values from select and if you are not using AS value none will match.

45 Posts
Jan
7 years ago
1
Level 7

Klas, thank you for your efforts to resolve the problem.
The use of aliases is not mandatory in MYSQL. What you say about this is already mentioned in the help for Seblod v2.x. My queries work well because the drop-lists are formed, but the selection of an option has no effect if I use select_dynamic.php v3.11 and later, with v3.10 and earlier it works.

45 Posts
Jan
7 years ago
0
Level 8

To find out the origin of the problem, I've compared in Winmerge the versions 3.10 and 3.11 of select_dynamic.php. The code in line number 469 - 498 of version 3.10 is almost equal to the code in line number 494 - 520 of version 3.11. The difference is the line with "$field->value = $value;", which occurs in version 3.10 and not in version 3.11. I inserted this code on line 514 in version 3.11 and now this version is also working fine.
So the error has not been made by me, but at the change of select_dynamic.php version 3.10 to version 3.11.

Get a Book for SEBLOD