View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Silient error when creating a document - ProjeQtOr
 
 

Silient error when creating a document

More
26 May 2014 17:55 #1 by juliocoelho
Hi,

Whenever I try to create a new document, despots it shows me all OK, the document isn't created and in the log file I have this entry:

2014-05-26 14:20:19 ***** ERROR ***** Exception-[22P02] SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type numeric: " "
LINE 1: ...'0' and idMailable='14' and ( false or idStatus=' ' or id...
^
2014-05-26 14:20:19 ***** ERROR ***** For query : select * from statusmail where idle='0' and idMailable='14' and ( false or idStatus=' ' or idEvent='9' )
2014-05-26 14:20:19 ***** ERROR ***** Strack trace :
2014-05-26 14:20:19 ***** ERROR ***** #0 Sql->query called at [/opt/projeqtor/model/persistence/SqlElement.php:1444]
2014-05-26 14:20:19 ***** ERROR ***** #1 SqlElement->getSqlElementsFromCriteria called at [/opt/projeqtor/model/persistence/SqlElement.php:2780]
2014-05-26 14:20:19 ***** ERROR ***** #2 SqlElement->sendMailIfMailable called at [/opt/projeqtor/model/persistence/SqlElement.php:501]
2014-05-26 14:20:19 ***** ERROR ***** #3 SqlElement->saveSqlElement called at [/opt/projeqtor/model/persistence/SqlElement.php:371]
2014-05-26 14:20:19 ***** ERROR ***** #4 SqlElement->save called at [/opt/projeqtor/model/Document.php:238]
2014-05-26 14:20:19 ***** ERROR ***** #5 Document->save called at [/opt/projeqtor/tool/saveObject.php:58]
2014-05-26 14:20:19 ***** ERROR ***** Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2014-05-26 14:20:19 ***** ERROR ***** For query : SELECT a.attname as field, pg_catalog.format_type(a.atttypid, a.atttypmod) as type FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='documentversion') AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
2014-05-26 14:20:19 ***** ERROR ***** Strack trace :
2014-05-26 14:20:19 ***** ERROR ***** #0 Sql->query called at [/opt/projeqtor/model/persistence/SqlElement.php:2097]
2014-05-26 14:20:19 ***** ERROR ***** #1 SqlElement->getFormatList called at [/opt/projeqtor/model/persistence/SqlElement.php:1874]
2014-05-26 14:20:19 ***** ERROR ***** #2 SqlElement->getDataType called at [/opt/projeqtor/model/persistence/SqlElement.php:1411]
2014-05-26 14:20:19 ***** ERROR ***** #3 SqlElement->getSqlElementsFromCriteria called at [/opt/projeqtor/model/Document.php:258]
2014-05-26 14:20:19 ***** ERROR ***** #4 Document->save called at [/opt/projeqtor/tool/saveObject.php:58]
2014-05-26 14:20:19 ***** ERROR ***** Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2014-05-26 14:20:19 ***** ERROR ***** For query : select * from documentversion where documentversion.idDocument='1'
2014-05-26 14:20:19 ***** ERROR ***** Strack trace :
2014-05-26 14:20:19 ***** ERROR ***** #0 Sql->query called at [/opt/projeqtor/model/persistence/SqlElement.php:1444]
2014-05-26 14:20:19 ***** ERROR ***** #1 SqlElement->getSqlElementsFromCriteria called at [/opt/projeqtor/model/Document.php:258]
2014-05-26 14:20:19 ***** ERROR ***** #2 Document->save called at [/opt/projeqtor/tool/saveObject.php:58]
2014-05-26 14:20:19 ***** ERROR ***** Exception-[25P02] SQLSTATE[25P02]: In failed sql transaction: 7 ERROR: current transaction is aborted, commands ignored until end of transaction block
2014-05-26 14:20:19 ***** ERROR ***** For query : select * from checklistdefinition where nameChecklistable='Document' and (idType is null or idType=98)
2014-05-26 14:20:19 ***** ERROR ***** Strack trace :
2014-05-26 14:20:19 ***** ERROR ***** #0 Sql->query called at [/opt/projeqtor/model/persistence/SqlElement.php:1444]
2014-05-26 14:20:19 ***** ERROR ***** #1 SqlElement->getSqlElementsFromCriteria called at [/opt/projeqtor/tool/saveObject.php:71]

I tried to execute the first statement on the database directly and, in fact, it does not like it :

select * from statusmail where idle='0' and idMailable='14' and ( false or idStatus=' ' or idEvent='9' )

It doesn't like the space on the "idStatus" field, since it is expecting a numeric.

By the way, I am running on a PostgreSQL v8.4.20.

BR/

Júlio Coelho

Please Log in or Create an account to join the conversation.

More
28 May 2014 11:07 #2 by babynus
Hi,

You're facing a specific PostgreSql issue.

To fix it, just replace line 2749 in /model/persistence/SqlElement.php from
if ($statusChange) {
to
if ($statusChange and $this->idStatus) {

It occurs only on documents because all other items get a current status on creation.

This fix will be included in V4.3.0.
Ticket #1393.

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.049 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.