Unable to delete a team

Discussion forum about Anuko Time Tracker
Post Reply
eldrinduran
Posts: 3
Joined: Fri Mar 23, 2018 9:08 am

Unable to delete a team

Post by eldrinduran » Fri Mar 23, 2018 10:05 am

Hi, I can't delete a team when using the admin acct. When I clicked the delete button the page goes error

'This page isn't working. 1xx.xxx.xxx.xx3 is currently unable to handle this request. HTTP ERROR 500'

Then, if I refresh the page it goes back to the page where there is a delete button.

I hope someone can help me about this :( . Thank you!

wrc
Posts: 278
Joined: Tue May 25, 2010 8:30 pm

Re: Unable to delete a team

Post by wrc » Fri Mar 23, 2018 11:18 am

eldrinduran wrote:Hi, I can't delete a team when using the admin acct. When I clicked the delete button the page goes error

'This page isn't working. 1xx.xxx.xxx.xx3 is currently unable to handle this request. HTTP ERROR 500'

Then, if I refresh the page it goes back to the page where there is a delete button.

I hope someone can help me about this :( . Thank you!
What are the following:

Version of Time Tracker (in the footer)?
Version of database (in dbinstall.php)?
What does your web server error log say when you perform this operation? <- This will most likely tell right away what the problem is.

A fix is probably to update Time Tracker to the latest. If the problem is still there, provide us with additional details, specifically with the error log message,

eldrinduran
Posts: 3
Joined: Fri Mar 23, 2018 9:08 am

Re: Unable to delete a team

Post by eldrinduran » Fri Mar 23, 2018 12:20 pm

Hi, thank you for your reply.

Version of Time Tracker? - Anuko Time Tracker 1.17.65.4131
Version of database? - 1.17.65.
What does your web server error log say when you perform this operation?

[Fri Mar 23 12:18:01.521111 2018] [php7:warn] [pid 12845] [client 112.211.97.37:53700] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/timetracker/WEB-INF/lib/pear/MDB2.php on line 826
[Fri Mar 23 12:18:03.417400 2018] [php7:warn] [pid 12845] [client 112.211.97.37:53700] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/timetracker/WEB-INF/lib/pear/MDB2.php on line 826, referer: http://1xx.xxx.xxx.xx3/timetracker/admi ... e.php?id=2
[Fri Mar 23 12:18:03.446315 2018] [php7:error] [pid 12845] [client 112.211.97.37:53700] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function ttAdmin::getSubgroups(), 0 passed in /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php on line 110 and exactly 1 expected in /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php:37\nStack trace:\n#0 /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php(110): ttAdmin->getSubgroups()\n#1 /var/www/html/timetracker/admin_team_delete.php(52): ttAdmin->markGroupDeleted(2)\n#2 {main}\n thrown in /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php on line 37, referer: http://1xx.xxx.xxx.xx3/timetracker/admi ... e.php?id=2

Nik
Posts: 479
Joined: Wed May 26, 2010 5:55 pm

Re: Unable to delete a team

Post by Nik » Fri Mar 23, 2018 2:32 pm

eldrinduran wrote: [Fri Mar 23 12:18:03.446315 2018] [php7:error] [pid 12845] [client 112.211.97.37:53700] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function ttAdmin::getSubgroups(), 0 passed in /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php on line 110 and exactly 1 expected in /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php:37\nStack trace:\n#0 /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php(110): ttAdmin->getSubgroups()\n#1 /var/www/html/timetracker/admin_team_delete.php(52): ttAdmin->markGroupDeleted(2)\n#2 {main}\n thrown in /var/www/html/timetracker/WEB-INF/lib/ttAdmin.class.php on line 37, referer: http://1xx.xxx.xxx.xx3/timetracker/admi ... e.php?id=2
Thanks for the error log, which explains the issue. I added a missing $group_id parameter in getSubgroups() call in Time Tracker version 1.17.67.4141. Please try updating and let us know if you still see the problem.

In WEB-INF/lib/ttAdmin.class.php

Code: Select all

function markGroupDeleted($group_id) {
  $subgroups = $this->getSubgroups($group_id);
  ...

eldrinduran
Posts: 3
Joined: Fri Mar 23, 2018 9:08 am

Re: Unable to delete a team

Post by eldrinduran » Mon Mar 26, 2018 12:24 am

Good day! Thank you for your help. It works fine now. :)

Post Reply