ERROR ON exec_query() - database.class.php

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

ERROR ON exec_query() - database.class.php

Postby RTP.Techie » Sun May 31, 2009 8:16 pm

Hi,
I'm new to TestLink and just downloaded TL version 1.8.2... and get all the things set up. I'm using mySQL 4.1.
Just have test run and created a user, then trying to create a new test plan... I see this errors... What should I do?




ERROR ON exec_query() - database.class.php
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 ') ORDER BY name' at line 1 - SELECT NH.id,NH.name,notes,active,testproject_id FROM nodes_hierarchy NH,testplans TPLAN WHERE NH.id=TPLAN.id AND (testproject_id = ) ORDER BY name

THE MESSAGE :: SQL [13] executed [took 0.0001 secs][all took 0.1539 secs]: SELECT NH.id,NH.name,notes,active,testproject_id FROM nodes_hierarchy NH,testplans TPLAN WHERE NH.id=TPLAN.id AND (testproject_id = ) ORDER BY name Query failed: errorcode[1064] errormsg: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 ') ORDER BY name' at line 1
ERROR ON exec_query() - database.class.php
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 'AND CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_desig' at line 1 - SELECT CF.*,CFTP.display_order,CFDV.value AS value,CFDV.node_id AS node_id FROM custom_fields CF JOIN cfield_testprojects CFTP ON CFTP.field_id=CF.id JOIN cfield_node_types CFNT ON CFNT.field_id=CF.id AND CFNT.node_type_id=5 LEFT OUTER JOIN cfield_design_values CFDV ON CFDV.field_id=CF.id AND CFDV.node_id=0 WHERE CFTP.testproject_id= AND CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_design=1 ORDER BY display_order,CF.id

THE MESSAGE :: SQL [15] executed [took 0.0001 secs][all took 0.1545 secs]: SELECT CF.*,CFTP.display_order,CFDV.value AS value,CFDV.node_id AS node_id FROM custom_fields CF JOIN cfield_testprojects CFTP ON CFTP.field_id=CF.id JOIN cfield_node_types CFNT ON CFNT.field_id=CF.id AND CFNT.node_type_id=5 LEFT OUTER JOIN cfield_design_values CFDV ON CFDV.field_id=CF.id AND CFDV.node_id=0 WHERE CFTP.testproject_id= AND CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_design=1 ORDER BY display_order,CF.id Query failed: errorcode[1064] errormsg: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 'AND CFTP.active=1 AND CF.show_on_design=1 AND CF.enable_on_desig' at line 1
RTP.Techie
TestLink user
 
Posts: 6
Joined: Sun May 31, 2009 8:08 pm

Postby havlatm » Mon Jun 01, 2009 10:10 am

I'm not able to reproduce your case. I see that in the SQL request is missing Test project ID. That's the problem.
Could you confirm that you have a Test project name in right top corner listed? Are you able to reproduce it again? Thanks.
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Postby havlatm » Mon Jun 01, 2009 9:52 pm

Refer to tracker #0002558 for the next.
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech

Postby RTP.Techie » Tue Jun 02, 2009 2:11 am

Since I've a brand-new installation, there is no test plan yet...
So when I click Test Plan Management, it shows a page only has "create" button on it... (see attached pix in the tracker), then as soon as you click on it, I see the problem...
RTP.Techie
TestLink user
 
Posts: 6
Joined: Sun May 31, 2009 8:08 pm

Postby RTP.Techie » Tue Jun 02, 2009 2:26 am

I think that I found the bug...
The problem is that: After I just install TL, and log-in as Admin, then from there, the only thing that I did as Admin is to create a user as Leader
Then, I log-in as the new user (Leader)... But the default role of leader does not have right to create "test project"; so the the only thing that I can do is to create a test plan... by clicking the "create" button as I indicated, then I got the error.
So, I logged back as admin and give the Leader role the right to create test project; then logout and log back in as Leader, then, the 1st thing that TL asks me to do is to create test project....
From there on, things start to work...
So it is still a bug that need to fix like not letting the leader to create test plan since there is no test project. But how about if I follow the same flow and not able to create anything, I still don;t want to do next?? Should leader allow to create test project by default?
RTP.Techie
TestLink user
 
Posts: 6
Joined: Sun May 31, 2009 8:08 pm

Postby havlatm » Tue Jun 02, 2009 7:27 am

I see you find uncovered combination :)
Thanks for reporting. We improve robustness for the case.
havlatm
Member of TestLink Community
 
Posts: 940
Joined: Mon Oct 31, 2005 1:24 am
Location: Czech


Return to TestLink 1.8 (OBSOLETE => EOL)[LOCKED]



Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests