Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
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
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.