Forum

[SOLVED] SQL Error ...
 
Notifications
Clear all

[SOLVED] SQL Error after 8.6.4 update

4 Posts
2 Users
0 Reactions
1,482 Views
(@pipobru)
Posts: 180
Active Member
Topic starter
 
[#7019]

Hello,
I have this errors in log after the migration:
It is when i would update "reste à faire" Sorry for French 🙂

2020-11-06 10:09:44.988 ** ERROR ** [V8.6.4] Exception-[22P02] SQLSTATE[22P02]: Invalid text representation: 7 ERREUR: syntaxe en entrée invalide pour le type numeric : « »
LINE 1: update assignment set idle='' where refType='Assignment' an...
^
2020-11-06 10:09:44.988 ** ERROR ** [V8.6.4] For query : update assignment set idle='' where refType='Assignment' and refId=8509
2020-11-06 10:09:44.988 ** ERROR ** [V8.6.4] Strack trace :
2020-11-06 10:09:44.988 ** ERROR ** [V8.6.4] #0 Sql->query called at [/home/projtma/public_html/model/persistence/SqlElement.php:1687]
2020-11-06 10:09:44.988 ** ERROR ** [V8.6.4] #1 SqlElement->updateSqlElement called at [/home/projtma/public_html/model/persistence/SqlElement.php:1126]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #2 SqlElement->saveSqlElement called at [/home/projtma/public_html/model/persistence/SqlElement.php:790]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #3 SqlElement->save called at [/home/projtma/public_html/model/Assignment.php:208]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #4 Assignment->save called at [/home/projtma/public_html/tool/saveAssignment.php:234]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] For query : update note set idle='' where refType='Assignment' and refId=8509
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] Strack trace :
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #0 Sql->query called at [/home/projtma/public_html/model/persistence/SqlElement.php:1748]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #1 SqlElement->updateSqlElement called at [/home/projtma/public_html/model/persistence/SqlElement.php:1126]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #2 SqlElement->saveSqlElement called at [/home/projtma/public_html/model/persistence/SqlElement.php:790]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #3 SqlElement->save called at [/home/projtma/public_html/model/Assignment.php:208]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #4 Assignment->save called at [/home/projtma/public_html/tool/saveAssignment.php:234]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] For query : delete from assignmentrecurring where idAssignment=8509
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] Strack trace :
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #0 Sql->query called at [/home/projtma/public_html/model/persistence/SqlElement.php:2047]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #1 SqlElement->purgeSqlElement called at [/home/projtma/public_html/model/persistence/SqlElement.php:959]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #2 SqlElement->purge called at [/home/projtma/public_html/tool/saveAssignment.php:260]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] For query : select * from activity where id=6411
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] Strack trace :
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #0 Sql->query called at [/home/projtma/public_html/model/persistence/SqlElement.php:3144]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #1 SqlElement->getSqlElement called at [/home/projtma/public_html/model/persistence/SqlElement.php:726]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #2 SqlElement->__construct called at [/home/projtma/public_html/model/ActivityMain.php:151]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #3 ActivityMain->__construct called at [/home/projtma/public_html/model/Activity.php:39]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] #4 Activity->__construct called at [/home/projtma/public_html/tool/saveAssignment.php:263]
2020-11-06 10:09:44.989 ** ERROR ** [V8.6.4] ERROR **
2020-11-06 10:09:44.989
** ERROR ** [V8.6.4] on file '/home/projtma/public_html/model/persistence/SqlElement.php' at line (3202)
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] cause = array_key_exists() expects parameter 2 to be array, boolean given
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] ERROR **
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] on file '/home/projtma/public_html/model/persistence/SqlElement.php' at line (3204)
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] cause = array_key_exists() expects parameter 2 to be array, boolean given
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] Error on SqlElement to get 'id' for Class 'Activity' : field 'id' not found in Database on table activity
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] ERROR **
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] on file '/home/projtma/public_html/model/persistence/SqlElement.php' at line (3202)
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] cause = array_key_exists() expects parameter 2 to be array, boolean given
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] ERROR **
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] on file '/home/projtma/public_html/model/persistence/SqlElement.php' at line (3204)
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] cause = array_key_exists() expects parameter 2 to be array, boolean given
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] Error on SqlElement to get 'reference' for Class 'Activity' : field 'reference' not found in Database on table activity
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] ERROR **
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] on file '/home/projtma/public_html/model/persistence/SqlElement.php' at line (3202)
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] cause = array_key_exists() expects parameter 2 to be array, boolean given
2020-11-06 10:09:44.990
** ERROR ** [V8.6.4] ERROR **
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] on file '/home/projtma/public_html/model/persistence/SqlElement.php' at line (3204)
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] cause = array_key_exists() expects parameter 2 to be array, boolean given
2020-11-06 10:09:44.990 ** ERROR ** [V8.6.4] Error on SqlElement to get 'name' for Class 'Activity' : field 'name' not found in Database on table activity

Very thanks for this project, Used every days !
Bruno.


 
Posted : 06 Nov 2020 12H19
(@babynus)
Posts: 14952
Member Admin
 

Issue confirmed (On PostgreSql database only)
Ticket #5065 recorded


 
Posted : 06 Nov 2020 13H43
(@babynus)
Posts: 14952
Member Admin
 

Fix is to replace line 207 in tool/saveAssignment.php
from 

$assignment->idle=trim($idle);

to

$assignment->idle=intval(trim($idle));

 
Posted : 06 Nov 2020 13H44
(@pipobru)
Posts: 180
Active Member
Topic starter
 

very impressed by this efficiency ! It work
BIG THANKS !


 
Posted : 06 Nov 2020 13H54
Share:

Scroll to Top