Auto logout does not consider activity while creating node and adding content on ckeditor of paragraph. And autlogout manager getRmaining time is having improper code to fetch logout_regardless_of_activity data
Install the module. Try creating page ex: node/add/page and say we ahve some paragraph field which use ckeditor instances, while the user is typing the content - the activity is being set to false and hence user gets logged out even thought user is creating content or active.
Update js to include all possible events and set activity variable from AutologoutController using function ajaxSetLast
/**
* Ajax callback to reset the last access session variable.
*/
public function ajaxSetLast() {
$_SESSION['autologout_last'] = $this->time->getRequestTime();
// Reset the timer.
$response = new AjaxResponse();
$markup = $this->autoLogoutManager->createTimer();
$response->addCommand(new ReplaceCommand('#timer', $markup));
$response->addCommand(new SettingsCommand(['activity' => true]));
return $response;
}
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | autologout-3319047-activity-ckeditor-3.patch | 3.47 KB | rakshith.thotada |
| #4 | autologout-3319047-activity-ckeditor-2.patch | 5.14 KB | rakshith.thotada |
| #2 | autologout-3319047-activity-ckeditor.patch | 3.89 KB | rakshith.thotada |
Comments
Comment #2
rakshith.thotada commentedComment #3
rakshith.thotada commentedComment #4
rakshith.thotada commentedUpdated patch to respect the timer for bounce using jquery to controll memory usage.
Comment #5
gombi commentedI was able to reproduce the issue described when having a background tab open. Autologout was then triggered in the background tab regardless of any activity in the paragraphs' ckeditor. Applying the patch resolves this issue.
I believe, however, that this issue is related to the autologout getting triggered in background tabs issue (https://www.drupal.org/project/autologout/issues/3214958), and is not caused by autologout ignoring ckeditor activity inside paragraphs. For example, without applying your patch, moving the mouse while on a node add page will still trigger autologout in the background tab(s). With your patch applied, autologout will not be triggered as the activity flag will be correctly set. For this reason, I'm inclined to mark this as a duplicate but would like your input first, in case I'm missing something.
That being said, I do believe that your approach to the issue is the best for the aforementioned issue and that your patch would resolve it. :)
Comment #6
WebbehComment #7
rakshith.thotada commentedUpdated patch resolving spacing issue.
Comment #8
joseph.olstadreviewing latest patch now
Comment #9
joseph.olstadpatches conflict with 3214958 , needs a reroll to be compatible with #3214958: Autologout triggered in background tab, no indication in other open tabs
Comment #10
joseph.olstadI suggest combining the efforts here with #3214958: Autologout triggered in background tab, no indication in other open tabs
Comment #11
joseph.olstad***EDIT***
reviewing now
***EDIT***
Comment #12
gombi commentedClosing this as the issue has been fixed: https://www.drupal.org/project/autologout/issues/3214958