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

User deletion not possible in 0.7.0 #936

Closed
rschulzeLE opened this issue Jun 9, 2020 · 2 comments · Fixed by #939
Closed

User deletion not possible in 0.7.0 #936

rschulzeLE opened this issue Jun 9, 2020 · 2 comments · Fixed by #939

Comments

@rschulzeLE
Copy link

rschulzeLE commented Jun 9, 2020

Baikal version: 0.7.0

Expected behaviour:
User is deleted if the "Delete" button is pressed and the deletion is confirmed

Current behaviour:
Since the update to Baikal 0.7.0 an error message shows up after I try to confirm the deletion of a user. The user's ressources are deleted but the user itself still shows up in my user list. "Display name" and "Email" are empty, solely the username is still there. A second attempt to delete the user has no further effect.

The error message that shows up:

Error: Call to a member function destroy() on null in /volume1/http/baikal/Core/Frameworks/Baikal/Model/User.php:184

Stack trace:
#0 /volume1/http/baikal/Core/Frameworks/BaikalAdmin/Controller/Users.php(165): Baikal\Model\User->destroy()
#1 /volume1/http/baikal/Core/Frameworks/BaikalAdmin/Controller/Users.php(53): BaikalAdmin\Controller\Users->actionDelete()
#2 /volume1/http/baikal/Core/Frameworks/Flake/Core/Render/Container.php(62): BaikalAdmin\Controller\Users->execute()
#3 /volume1/http/baikal/Core/Frameworks/Flake/Controller/Page.php(88): Flake\Core\Render\Container->execute()
#4 /volume1/http/baikal/html/admin/index.php(90): Flake\Controller\Page->render()
#5 {main}
@ByteHamster
Copy link
Member

Thanks for reporting. Baikal definitely needs unit tests...
The original error is not logged. What causes the first deletion to fail is the following:

ErrorException: Undefined index: calendarid in /baikal/Core/Frameworks/Baikal/Model/Calendar/Calendar.php:43
Stack trace:
#0 /baikal/Core/Frameworks/Baikal/Model/Calendar/Calendar.php(43): Baikal\\Framework::exception_error_handler(8, 'Undefined index...', '...', 43, Array)
#1 /baikal/Core/Frameworks/Baikal/Model/Calendar/Calendar.php(56): Baikal\\Model\\Calendar\\Calendar->hasInstances()
#2 /baikal/Core/Frameworks/Baikal/Model/Calendar.php(268): Baikal\\Model\\Calendar\\Calendar->destroy()
#3 /baikal/Core/Frameworks/Baikal/Model/User.php(192): Baikal\\Model\\Calendar->destroy()
#4 /baikal/Core/Frameworks/BaikalAdmin/Controller/Users.php(165): Baikal\\Model\\User->destroy()
#5 /baikal/Core/Frameworks/BaikalAdmin/Controller/Users.php(53): BaikalAdmin\\Controller\\Users->actionDelete()
#6 /baikal/Core/Frameworks/Flake/Core/Render/Container.php(62): BaikalAdmin\\Controller\\Users->execute()
#7 /baikal/Core/Frameworks/Flake/Controller/Page.php(88): Flake\\Core\\Render\\Container->execute()
#8 /baikal/Core/Frameworks/BaikalAdmin/WWWRoot/index.php(90): Flake\\Controller\\Page->render()
#9 {main}, referer: http://localhost/baikal/html/admin/?/users/delete/5/

@rschulzeLE
Copy link
Author

Thanks for your fast fix! :-)

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

Successfully merging a pull request may close this issue.

2 participants