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

Adding subtasks as dependency to already dependent task created error; invalid argument in foreach() in query.class.php on line 182 #107

Open
nwinesett opened this issue Feb 4, 2020 · 3 comments

Comments

@nwinesett
Copy link

@nwinesett nwinesett commented Feb 4, 2020

I had a parent task with many child tasks, whose due date depends upon parent task. When I attempted to move a few of those child tasks to be a child task of one of the other child tasks, it broke the table and the project is now unaccessible from Project Manager module giving this error:

  Project ID is invalid. Unable to display.

My History causing the error at 10:35am:

02/04/2020 10:35 am Modified item "tasks_update(3)" in "tasks" table admin
  02/04/2020 10:35 am Modified item "tasks_update(3)" in "tasks" table
  02/04/2020 10:35 am Modified item "Review Contract, Obtain File Number, Open File, and Calendar Closing Date" in "tasks" table
  02/04/2020 10:35 am Modified item "tasks_update(3)" in "tasks" table

Wanted to report error, but also get an idea for undoing damage in database.

Using latest development code as of 2/1/2020.

Nathan

@nwinesett

This comment has been minimized.

Copy link
Author

@nwinesett nwinesett commented Feb 4, 2020

Update:
I fixed my immediate problem as follows, however, I don't understand what happened or why this fixed it. Using phpMyAdmin to edit the "tasks" table, I modified the row of the table for task_id = 3 (since this is what my history said was modifed. The only thing that seemed relevant to what I changed was that task_parent on this row was set to 9. I changed it to 0 and saved the table.

Project Manager did not pull up the project correctly, but no stated error.

I was able to access the task now from the task module, I edited some field (can't remember which, and saved it. Then, everything appeared to work correctly.

There is still some bug, but at least I'm back up and running.

@nwinesett

This comment has been minimized.

Copy link
Author

@nwinesett nwinesett commented Feb 4, 2020

Update:
When I try to make the subtask, dependent upon another subtask, I get this error:
Warning: Invalid argument supplied for foreach() in /home/averywh0/public_html/awwlegal.com/projects/classes/query.class.php on line 182

Warning: Cannot modify header information - headers already sent by (output started at /home/averywh0/public_html/awwlegal.com/projects/classes/query.class.php:182) in /home/averywh0/public_html/awwlegal.com/projects/classes/ui.class.php on line 585

This did not break the project manager however, but did not modify the task to be dependent of the subtask either.

It appears that it is not setup to have multiple levels of childtasks. It broke the system when I tried to use the projectmanager to update multiple tasks to be subtasks of an already dependent tasks.

I hope the detail helps.

@nwinesett

This comment has been minimized.

Copy link
Author

@nwinesett nwinesett commented Feb 20, 2020

I am still frequently getting this error when trying to manage dates with tasks. I've eliminated child tasks to try to isoloate this. For example, when I edit a task that has a task dependency and check "Set task start date based on dependency" then I get the following error:

Warning: Invalid argument supplied for foreach() in /home/averywh0/public_html/awwlegal.com/projects/classes/query.class.php on line 182

Warning: Cannot modify header information - headers already sent by (output started at /home/averywh0/public_html/awwlegal.com/projects/classes/query.class.php:184) in /home/averywh0/public_html/awwlegal.com/projects/classes/ui.class.php on line 585

Note that "Warning: Invalid argument supplied for foreach() in /home/averywh0/public_html/awwlegal.com/projects/classes/query.class.php on line 182" is repeated many times in the beginning.

@nwinesett nwinesett changed the title Adding subtasks as dependency to already dependent task created error Adding subtasks as dependency to already dependent task created error; invalid argument in foreach() in query.class.php on line 182 Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.