Anahita Project

Anahita Project's Topics

Scott Crawford

Scott Crawford

3 weeks ago

WSOD after deleting test user account

I received the following error after deleting a test user for whom I had initiated a password reset but never completed the actual reset / save account function.  I haven't been able to reproduce the error but thought it might be worth reporting anyway:

1: Uncaught Error: Call to a member function guest() on null in tmpl://koowa:template.stack:18 Stack trace:

#0 /home/.../anahita/vendor/anahita/anahita/vendor/nooku/libraries/koowa/template/abstract.php(535): include()

#1 /home/.../anahita/vendor/anahita/anahita/vendor/nooku/libraries/koowa/template/abstract.php(298): KTemplateAbstract->__sandbox()

#2 /home/.../anahita/vendor/anahita/anahita/vendor/nooku/libraries/koowa/template/abstract.php(276): KTemplateAbstract->loadString('loadFile('/home/...', Array, true)

#4 /home/.../anahita/vendor/anahita/anahita/src/libraries/default/base/template/abstract.php(225): LibBaseTemplateAbstract->loadFile('/home/...', Array, true)

#5 /home/.../anahita/vendor/anahita/anahita/src/ in /home/.../anahita/www/templates/base/html/tmpl/navbar.php on line 18

Fatal error: Uncaught Error: Call to a member function guest() on null in /home/.../anahita/vendor/anahita/anahita/src/libraries/default/sessions/domain/entity/session.php:87 Stack trace:

#0 /home/.../anahita/vendor/anahita/anahita/src/libraries/anahita/domain/entity/abstract.php(996): LibSessionsDomainEntitySession->_beforeEntityUpdate(Object(KCommandContext))

#1 /home/.../anahita/vendor/anahita/anahita/src/libraries/anahita/domain/repository/abstract.php(205): AnDomainEntityAbstract->execute('before.update', Object(KCommandContext))

#2 /home/.../anahita/vendor/anahita/anahita/vendor/nooku/libraries/koowa/command/chain.php(161): AnDomainRepositoryAbstract->execute('before.update', Object(KCommandContext))

#3 /home/.../anahita/vendor/anahita/anahita/src/libraries/anahita/domain/repository/abstract.php(264): KCommandChain->run('before.update', Object(KCommandContext))

#4 /home/.../anahita/vend in /home/.../anahita/vendor/anahita/anahita/src/libraries/default/sessions/domain/entity/session.php on line 87

Would you be able to tell how to reproduce the bug? Even an approximation would be good.
Scott Crawford
Scott Crawford
3 weeks ago Permalink
This one took place while I was checking the system emails. I had created a test user account via the Admin create-user process. I believe I had activated it once created from within the Admin account. Then, once created and active I had logged out, submitted the test user's email via the reset password view, and clicked on the token which took me to the test user's settings view after which I was satisfied the emails were functioning.

It was then that I initiated the delete, which as I recall I attempted from the test user's settings view that I was already on - e.g., after following the reset token.
So when user wants to delete themselves the error happens, right?
Scott Crawford
Scott Crawford
3 weeks ago Permalink
Yes based on the steps I had taken, but it was after (1) the user was set as active, and (2) upon successfully submitting a password reset request and following the token link - from wherein the delete was initiated.
What if you create a user, login as the user, and try to delete yourself?
Scott Crawford
Scott Crawford
3 weeks ago Permalink
So far I'm not able to recreate... I've since deleted my wscadvtech dev environment after going live and now on my staging server I'm getting the /sessions.php error, same as live... I'll need to fix that first before I can follow-up on this one.

Sorry - overloading your feed lately :)
No problem, that is more important. There could be an issue with server and php-fpm configuration, assuming you are using nginx.
Scott Crawford
Scott Crawford
2 weeks ago Permalink
OK, this one just happened to me again. Here's what the steps were:

1. Create a new account from scratch.
2. Click on the registration email token once it arrives.
3. You're now in the new user Profile settings....
4. I changed nothing in settings, then navigated among various links (i.e., doesn't seem to matter what's done "while you're in")
5. Navigate back to Profile settings then go to delete the account.
6. Error is generated.

So it seems this takes place during the new user's first session immediately after ... if they go to delete any time during that first session the WSOD happens. (At least that's what happened for me).

I should add this was a fresh install on the live ( domain
Rastin Mehr liked this
Thank you, I'll look into that first.
The bug is fixed in the master branch

Powered by Anahita