View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - Bug in link.php - ProjeQtOr
 
 

Bug in link.php

More
05 Nov 2014 23:23 #1 by mamath
Bug in link.php was created by mamath
Hi,

I have uncomment links between risk/action and issue, and all is working fine, but i have an error message in log file :
2014-11-05 23:09:12 ***** ERROR ***** Exception-[42000] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1
2014-11-05 23:09:12 ***** ERROR ***** For query : select * from l_link where ref1Type='Action' and ref1Id=44 and ref2Type=Issue'
2014-11-05 23:09:12 ***** ERROR ***** Strack trace :
2014-11-05 23:09:12 ***** ERROR ***** #0 Sql->query called at [D:\www\peps_dev_web\model\persistence\SqlElement.php:1452]
2014-11-05 23:09:12 ***** ERROR ***** #1 SqlElement->getSqlElementsFromCriteria called at [D:\www\peps_dev_web\model\Link.php:104]
2014-11-05 23:09:12 ***** ERROR ***** #2 Link->getLinksForObject called at [D:\www\peps_dev_web\model\persistence\SqlElement.php:1716]
2014-11-05 23:09:12 ***** ERROR ***** #3 SqlElement->getSqlElement called at [D:\www\peps_dev_web\model\persistence\SqlElement.php:352]
2014-11-05 23:09:12 ***** ERROR ***** #4 SqlElement->__construct called at [D:\www\peps_dev_web\model\ActionMain.php:85]
2014-11-05 23:09:12 ***** ERROR ***** #5 ActionMain->__construct called at [D:\www\peps_dev_web\model\Action.php:14]
2014-11-05 23:09:12 ***** ERROR ***** #6 Action->__construct called at [D:\www\peps_dev_web\view\objectDetail.php:2695]


After investigation the bug is because a missing quote in function "getLinksForObject" of link.php

you can solve it by changing line 95 from :
$where=" ref1Type='" . $class . "' and ref1Id=" . Sql::fmtId($obj->id) . " and ref2Type=" . $classLink . "' ";
to
$where=" ref1Type='" . $class . "' and ref1Id=" . Sql::fmtId($obj->id) . " and ref2Type='" . $classLink . "' ";

ProjeQtOr is an exceptionnal tools for managing project; thanks for your work.

Regards.
The topic has been locked.
More
06 Nov 2014 00:15 #2 by babynus
Replied by babynus on topic Bug in link.php
Hi,

Thanls for reporting the issue and providing the fix in the same time.

Will be included in next version.

Babynus
Administrator of ProjeQtOr web site
The topic has been locked.
Moderators: babynusprotion
Time to create page: 0.031 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.