By: kle_py
Date: 2010-08-23
Time: 16:58
|
Dynamic subblock show TBS-error when no subblock emptyHi,
I am adapting a small application to a modified database, there are some new (empty) fields in the database structure. In some cases i show listings, where i do a replacement of the displayed value using subblock with dynamic query. It works fine .. unless my subquery returns an empty array (no data). When no data are found, a TBS error is shown, for example:
What would be a clean way to supress such error messages ? - (and simply/silently show an empty string ?) Thank You. |
|||
By: Skrol29
Date: 2010-08-24
Time: 01:12
|
Re: Dynamic subblock show TBS-error when no subblock emptyHi,
It seems to be a TBS bug, can you provide a small snippet that reproduce the behavior? |
|||
By: kle_py
Date: 2010-08-24
Time: 14:30
|
Re: Dynamic subblock show TBS-error when no subblock emptyMy template is basically:
The script is basically:
Apropos. I am using TBS 3.5.3 and TBSsql 2.6 using tbssql_mysqli p.d. right now i also am testing with the TBS3.0 version from http://www.tinybutstrong.com/download/download.php?file=tbssql.zip&sid=2 (seems to be a beta) i get some additional messages:
Maybe this info can give a clue ? greetings, Klemens |
|||
By: Skrol29
Date: 2010-08-25
Time: 01:25
|
Re: Dynamic subblock show TBS-error when no subblock emptyHi Klemens,
Thanks for those details. I've reproduce your error message. It seems to be a bug in TBS subblock process. NULL and empty values are not supported for fields which links the main block and the subblock. This will be delicate to fix because it overlaps another feature. Nevertheless, you can workaround this problem by replacing [blk1.idtipo] with [blk1.idtipo;ifempty=0]. Assuming that you have no idtipo=0 in your table [trp_vehiculos]. I've fixed the version problem with TbsSQL 3.0, it should be ok now. Regards |
|||
By: kle_py
Date: 2010-08-25
Time: 14:33
|
Re: Dynamic subblock show TBS-error when no subblock emptyThanks skrol,
I think this workaround is a solution which looks "clean enough" for me :) . And it works ! And .. if it will not be too confusing - maybe there could be made a mention or remark for attention in the TBS manual about which parameters may not be null ? or tune the TBS error messages for these cases ? (to suggest the use of "ifempty" parameter) Thanks for the help, greetings, Klemens |