179 Posts
carin
9 years ago
6
Topic

Using Dynamic Cascade works as expected for a country/state drop down combination. But when the article that includes those fields is getting saved this error comes up where 'DE' is not a column but a value of the column kwg_iso2:

1054 exception 'RuntimeException' with message 'Unknown column 'DE' in 'where clause' SQL=SELECT kwg_country_en,kwg_iso2 FROM bsiju_cck_extra_country_jm WHERE kwg_iso2 IN (DE)' in ...

Get a Book for SEBLOD
32 Posts
sUrfa
9 years ago
2
Level 1

Hi carin,

I just encountered a similar issue:

When trying to load an object-form (edit) in joomla backend I got an error message like "Could not find column COSTA_RICA". Select: "SELECT id_region from jos_regions where name_country=COSTA_RICA". --> Issue here: Quotation marks were missing.

I added escaped quotation marks in file "select_dynamic_cascade.php line 181:

Before: 'SELECT '.$opt_parent.$opt_table.' WHERE '.$opt_value.'='.$value.''.$opt_and;

After: 'SELECT '.$opt_parent.$opt_table.' WHERE '.$opt_value.'=\''.$value.'\''.$opt_and;

I guess your issue lies in line 535. The quotation marks seem to be missing here as well (between the brackets).

Hope this helps:

@Seblod-Team: For the benefit of all users of the plugin: Could you please add these two fixes and provide a new version?

Thank you!

sUrfa

179 Posts
carin
9 years ago
0
Level 2

You are my hero :) Thanks a lot, saved my day!

179 Posts
carin
9 years ago
0
Level 2

After updating to 3.4.3 this fix stopped working for me ...

32 Posts
sUrfa
9 years ago
0
Level 1

I just saw that I missed one line in my last post. --> In total there are three places with missing quotation marks.

Adding the missing quotation marks as well in line 560 should do it.

Code after update:

$opt_where = ( $opt_value != '' && $value ) ? ' WHERE '.$opt_value.' IN (\''.$value.'\')' : '';

4229 Posts
Kadministrator
9 years ago
0
Level 1

Hi,

which verison of the plugin do you use? This was already fixed some time ago, please get latest version.

32 Posts
sUrfa
9 years ago
0
Level 1

Hi Klas,

thank you for your response! I've been using version 1.1.3. I just checked "My downloads" and found version 1.1.4. Here the issue seems to be fixed.

Best Regards

sUrfa

Get a Book for SEBLOD