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

SessionHistory don't work #489

Open
scorpsan opened this issue Dec 29, 2022 · 6 comments
Open

SessionHistory don't work #489

scorpsan opened this issue Dec 29, 2022 · 6 comments

Comments

@scorpsan
Copy link

What steps will reproduce the problem?

I have override classes
'classMap' => [
'User' => \common\models\User::class,
'Profile' => \common\models\Profile::class,
'RegistrationForm' => \common\forms\RegistrationForm::class,
'LoginForm' => \common\forms\LoginForm::class,
'Token' => \common\models\Token::class,
'MailService' => \common\components\user\Service\MailService::class,
],
'controllerMap' => [
'registration' => 'frontend\controllers\user\RegistrationController',
'security' => 'frontend\controllers\user\SecurityController',
'profile' => 'frontend\controllers\user\ProfileController',
'settings' => 'frontend\controllers\user\SettingsController',
'admin' => 'frontend\controllers\user\AdminController',
],

SessionHistory settings configure like in docs
But on the page SessionHistory empty

May be need some changes in the override actions or functions. where module save data about session in to the database?

@maxxer
Copy link
Collaborator

maxxer commented Dec 29, 2022

Have you checked app.log or webserver's error log?

@scorpsan
Copy link
Author

No errors.
If there were errors, I would correct everything.
Perhaps some new line of code is missing in my redefined actions
At what point is the session database written to?

@maxxer
Copy link
Collaborator

maxxer commented Dec 29, 2022

The session class is loaded into the bootstrapping phase.

Try with XDebug to understand why it's not writing data to db.

@cuongbn
Copy link

cuongbn commented Oct 28, 2023

I have the same error, I configured it exactly as instructed but the database has no records written

@krdma22
Copy link

krdma22 commented Nov 20, 2023

same issue, in log only deleting old session and didnt create new session history entity, any suggestion?

@cuongbn
Copy link

cuongbn commented Feb 28, 2024

i found fix, in Da\User\Service\SessionHistory\SessionHistoryDecorator::class
fix function
public function getUseCustomStorage() { return $this->session->getUseCustomStorage(); }
To
public function getUseCustomStorage() { return true; }
Hope to receive everyone's comments. I think this function still has some error.

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

4 participants