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;
  }

Comments

rakshith.thotada created an issue. See original summary.

rakshith.thotada’s picture

StatusFileSize
new3.89 KB
rakshith.thotada’s picture

Status: Active » Needs review
rakshith.thotada’s picture

Updated patch to respect the timer for bounce using jquery to controll memory usage.

gombi’s picture

Status: Needs review » Postponed (maintainer needs more info)
Related issues: +#3214958: Autologout triggered in background tab, no indication in other open tabs

I 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. :)

Webbeh’s picture

Assigned: rakshith.thotada » Unassigned
rakshith.thotada’s picture

Updated patch resolving spacing issue.

joseph.olstad’s picture

Status: Postponed (maintainer needs more info) » Active

reviewing latest patch now

joseph.olstad’s picture

patches conflict with 3214958 , needs a reroll to be compatible with #3214958: Autologout triggered in background tab, no indication in other open tabs

joseph.olstad’s picture

Status: Active » Needs work
joseph.olstad’s picture

***EDIT***
reviewing now
***EDIT***

gombi’s picture

Status: Needs work » Closed (duplicate)
Issue tags: -JavaScript +JavaScript

Closing this as the issue has been fixed: https://www.drupal.org/project/autologout/issues/3214958