Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparent error in SQL syntax #125

Open
nwinesett opened this issue May 5, 2020 · 1 comment
Open

Apparent error in SQL syntax #125

nwinesett opened this issue May 5, 2020 · 1 comment

Comments

@nwinesett
Copy link

I am using latest devel branch as of May 5, 2020.

When making a new project and importing tasks from my template (with "scale tasks" checked), I was directed to the following error page: https://...../index.php?m=projects and the following excerpts:

ERROR: /home//projects/classes/query.class.php(691): query failed(DELETE FROM dotp_user_tasks WHERE task_id = ) - error was: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
Backtrace:
0 /home/
/projects/classes/query.class.php:691 dprint('/home//projects/classes/query.class.php',691,0,'query failed(DELETE FROM dotp_user_tasks WHERE task_id = ) - error was: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1')
1 /home/
/projects/modules/tasks/tasks.class.php:480 exec()
2 /home//projects/modules/projects/projects.class.php:211 copy(14,0)
3 /home/
/projects/modules/projects/do_project_aed.php:61 importTasks(1,1)
4 /home//projects/index.php:241 require('/home//projects/modules/projects/do_project_aed.php')

ERROR: /home//projects/classes/query.class.php(691): query failed(DELETE FROM dotp_task_dependencies WHERE dependencies_task_id=) - error was: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
Backtrace:
0 /home/
/projects/classes/query.class.php:691 dprint('/home//projects/classes/query.class.php',691,0,'query failed(DELETE FROM dotp_task_dependencies WHERE dependencies_task_id=) - error was: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1')
1 /home/
/projects/modules/tasks/tasks.class.php:863 exec()
2 /home//projects/modules/tasks/tasks.class.php:497 updateDependencies('')
3 /home/
/projects/modules/projects/projects.class.php:211 copy(14,0)
4 /home//projects/modules/projects/do_project_aed.php:61 importTasks(1,1)
5 /home/
/projects/index.php:241 require('/home/***/projects/modules/projects/do_project_aed.php')

Warning: Cannot modify header information - headers already sent by (output started at /home//projects/includes/main_functions.php:624) in /home//projects/classes/ui.class.php on line 585

@ajdonnison
Copy link
Contributor

I can't duplicate this - and it would require that the creation of the task itself failed to trigger it not having an ID. This is not something I've seen before as the copy uses exactly the same insert logic that creating a task from scratch does. I'm wondering if there is some database corruption going on here. Do you know how to look into the database and check if the task was copied to the new project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants