Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007955TestLinkTest Project Managementpublic2017-05-30 11:432018-04-15 10:36
Reportershavantha 
Assigned Tofman 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version1.9.16 (2016 Q4) 
Fixed in Version1.9.17 (2018 Q1) 
Summary0007955: when enabling/disabling requirement feautes Unknown column 'testprojects.id' in 'where clause
Descriptionwhen I click on enable/disable option for requirement features under Test Project Management, testlink throws an error on UI

The logs print
================

[<<][592d57fe7d43f371003513][DEFAULT][/lib/project/projectEdit.php][17/May/30 11:31:10][17/May/30 11:31:10][took 0.0049210000000001 secs]
[>>][592d57fe7e8aa588389136][DEFAULT][/lib/project/projectEdit.php][17/May/30 11:31:10]
    [17/May/30 11:31:10][ERROR][v9feotppmodhvahe3t5dgov8q6][DATABASE]
        ERROR ON exec_query() - database.class.php
1054 - Unknown column 'testprojects.id' in 'where clause' - /* Class:testproject - Method: setOptions */ UPDATE TL_testprojects SET options = 'O:8:\"stdClass\":4:{s:19:\"requirementsEnabled\";i:1;s:19:\"testPriorityEnabled\";i:1;s:17:\"automationEnabled\";i:1;s:16:\"inventoryEnabled\";i:0;}' WHERE testprojects.id = 36840
THE MESSAGE : /* Class:testproject - Method: setOptions */ UPDATE TL_testprojects SET options = 'O:8:\"stdClass\":4:{s:19:\"requirementsEnabled\";i:1;s:19:\"testPriorityEnabled\";i:1;s:17:\"automationEnabled\";i:1;s:16:\"inventoryEnabled\";i:0;}' WHERE testprojects.id = 36840
Query failed: errorcode[1054]
    errormsg:Unknown column 'testprojects.id' in 'where clause'
[<<][592d57fe7e8aa588389136][DEFAULT][/lib/project/projectEdit.php][17/May/30 11:31:10][17/May/30 11:31:10][took 0.013747 secs]

Steps To Reproducesteps
1.follow the migration steps from 1.9.15 to 1.9.16 using the db scripts

2.set the custom_config.inc.php to login as an LDAP user

3.click on the enable/disable (light bulb option)

Note:The UI shows the error as below:
================================================================================
 DB Access Error - debug_print_backtrace() OUTPUT START

 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)

            Having this additional Information could be useful for reporting

            issue to development TEAM.

 ==============================================================================

#0 database->exec_query(/* Class:testproject - Method: setOptions */ UPDATE TL_testprojects SET options = 'O:8:\"stdClass\":4:{s:19:\"requirementsEnabled\";i:0;s:19:\"testPriorityEnabled\";i:1;s:17:\"automationEnabled\";i:1;s:16:\"inventoryEnabled\";i:0;}' WHERE testprojects.id = 35718) called at [/var/www/html/testlink/lib/functions/testproject.class.php:3699]
#1 testproject->setOptions(35718, stdClass Object ([requirementsEnabled] => 0,[testPriorityEnabled] => 1,[automationEnabled] => 1,[inventoryEnabled] => 0)) called at [/var/www/html/testlink/lib/functions/testproject.class.php:3658]
0000002 testproject->disableRequirements(35718) called at [/var/www/html/testlink/lib/project/projectEdit.php:92]
=======================================================================
Additional InformationPreconditions
1.data should exist under Test Project Management option
TagsNo tags attached.
Database (MySQL,Postgres,etc)Ver 14.14 Distrib 5.5.46,
Browserfirefox
PHP VersionPHP 5.5.9-1ubuntu4.19
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Files? file icon testlink_logs [^] (2,441 bytes) 2017-05-30 11:43 [Show Content]

- Relationships

-  Notes
(0026414)
shavantha (reporter)
2017-05-30 11:56

I tested the same scenario on a fresh installation of 1.9.16 version of testlink and didnt come across this issue. But this issue comes on the setup which was migrated from 1.9.15 to 1.9.16
(0026417)
fman (administrator)
2017-05-30 19:04

if you give a look to the query you will see that issue regards TABLE PREFIX.
on the offending SQL it seems you are using TL_ as table prefix.

try changing setOptions method :

" WHERE id = " . $safeID;

instead of

" WHERE testproject.id = " . $safeID;
(0026418)
shavantha (reporter)
2017-05-31 04:56

thanks, the change helped to resolve the issue
(0027385)
fman (administrator)
2018-04-15 10:36

released

- Issue History
Date Modified Username Field Change
2017-05-30 11:43 shavantha New Issue
2017-05-30 11:43 shavantha File Added: testlink_logs
2017-05-30 11:56 shavantha Note Added: 0026414
2017-05-30 19:04 fman Note Added: 0026417
2017-05-30 19:04 fman Assigned To => fman
2017-05-30 19:04 fman Status new => feedback
2017-05-31 04:56 shavantha Note Added: 0026418
2017-05-31 04:56 shavantha Status feedback => assigned
2017-05-31 17:07 fman QA Team - Task Workflow Status => READY FOR TESTING
2017-05-31 17:07 fman Status assigned => resolved
2017-05-31 17:07 fman Fixed in Version => 1.9.17 (2018 Q1)
2017-05-31 17:07 fman Resolution open => fixed
2018-04-15 10:36 fman Note Added: 0027385
2018-04-15 10:36 fman Status resolved => closed



Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker