Hello,
i have this error with new version 8.2.0 on stats:
2019-09-20 11:13:48.960 ----- DEBUG ----- => stopping current Cron
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] Exception-[22P02] SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type numeric: "(-1)"
LINE 1: ...om plannedwork where day >= '20190902' and idResource='(-1)'
^
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] For query : select * from plannedwork where day >= '20190902' and idResource='(-1)'
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] Strack trace :
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] #0 Sql->query called at [/var/www/html/model/persistence/SqlElement.php:2480]
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] #1 SqlElement->getSqlElementsFromCriteria called at [/var/www/html/model/ResourceMain.php:336]
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] #2 ResourceMain->getWork called at [/var/www/html/model/PlannedWork.php:690]
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] #3 PlannedWork->plan called at [/var/www/html/tool/plan.php:50]
2019-09-20 11:14:48.567 ** ERROR ** [V8.2.0] Exception-[22P02] SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type numeric: "(-1)"
LINE 1: ...ct * from work where day >= '20190902' and idResource='(-1)'
Thanks for your help
Bruno.
Issue recorded as Ticket #4219
Hi,
We could not reproduce, but found a potential fix.
Fix is to replace line 334 in model/resourcemain.php from
$where.=" and idResource='" . Sql::fmtId($this->id) . "'";
to
$where.=" and idResource=" . Sql::fmtId($this->id);
Could you please try this fix and confirm that is fioxes the issue for you ?
whithout modification i don't reproduce the problem. I check every day and if the problem re appairt i complete the post with more details