Results 1 to 10 of 79

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    104
    Plugin Contributions
    0

    Default Re: Admin Keepalive Timer [Support Thread]

    I am getting the "We are unable to connect to the server. Your work may be lost....." alert. It's super annoying, so I disabled the "alert('<?php echo TEXT_KEEPALIVE_SERVER_UNREACHABLE_MESSAGE1;?>');" code to no ill effects.

    I have noticed, though, that even when I click the "Yes, Keep Working" button, the header on the site continues to countdown, until it says "!!Expired Session" But It's not actually expired. Just the page's header says that. And the countdown isn't even consistent after clicking keep working, then navigate to another tab. It will hang out at like 181 2-3 seconds, 180 for even longer, sometimes flash the pages actual title, then continue counting down at normal speed once the tab is in focus. Once it says expired session, the next time the modal box pops up, it doesn't give the countdown, it says that the session expired and to login.

  2. #2
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: Admin Keepalive Timer [Support Thread]

    Quote Originally Posted by apogeerockets View Post
    I am getting the "We are unable to connect to the server. Your work may be lost....." alert. It's super annoying, so I disabled the "alert('<?php echo TEXT_KEEPALIVE_SERVER_UNREACHABLE_MESSAGE1;?>');" code to no ill effects.

    I have noticed, though, that even when I click the "Yes, Keep Working" button, the header on the site continues to countdown, until it says "!!Expired Session" But It's not actually expired. Just the page's header says that. And the countdown isn't even consistent after clicking keep working, then navigate to another tab. It will hang out at like 181 2-3 seconds, 180 for even longer, sometimes flash the pages actual title, then continue counting down at normal speed once the tab is in focus. Once it says expired session, the next time the modal box pops up, it doesn't give the countdown, it says that the session expired and to login.
    Yes, this has been an issue for yonks and was first mentioned in this thread in Sept 2013.

    I have several ZC 1.5.4 installs on my local dev server (PHP 5.5.9, Apache 2.4 etc, Ubuntu OS, etc) and it happens only on one site, the others are not giving me the error. I did core file comparisons left, right and center but can't pin-point the cause of this annoying error. All the core files in admin are the same in all sites.

    Now I am thinking that there may be a clash with some other jscripts (from installed mods) which could produce that message..... so my next move will be to (temporarily) kick out all other non-core scripts from the admin/includes/javascript folder, test without them and add them back one by one. Tedious, but it may throw a light on this .... eventually.

  3. #3
    Join Date
    Mar 2016
    Location
    Laval, Quebec, Canada
    Posts
    3
    Plugin Contributions
    0

    Default Re: Admin Keepalive Timer [Support Thread]

    Quote Originally Posted by frank18 View Post
    Yes, this has been an issue for yonks and was first mentioned in this thread in Sept 2013.

    I have several ZC 1.5.4 installs on my local dev server (PHP 5.5.9, Apache 2.4 etc, Ubuntu OS, etc) and it happens only on one site, the others are not giving me the error. I did core file comparisons left, right and center but can't pin-point the cause of this annoying error. All the core files in admin are the same in all sites.

    Now I am thinking that there may be a clash with some other jscripts (from installed mods) which could produce that message..... so my next move will be to (temporarily) kick out all other non-core scripts from the admin/includes/javascript folder, test without them and add them back one by one. Tedious, but it may throw a light on this .... eventually.
    I'm getting to this discussion a few months later but I hope it's useful to others.

    I've just implemented the Keepalive Timer module in the admin area and I had the same problem where the keepalive.php page was being called through ajax and kept falling 5 times until the TEXT_KEEPALIVE_SERVER_UNREACHABLE_MESSAGE1 pop-up.

    I found it has to do with the $.ajax timeout value set to 450ms on line 170 in the /admin_area/includes/javascript/jquery.idletimeout.js file.

    Increasing that value to 3000 (3 seconds) solves it for me.

    @DrByte I'm wondering if calling the keepalive.php every minute during 10 minutes isn't defeating the purpose of having a 15 minutes session? Every time the keepalive.php script is being called, I see the expiration time on the session increase.

    If "idleAfter" is set to 600 seconds (10 minutes) before actually being defined as idle, it means the actual session still has 15 minutes to go. So, one can leave its computer idle for 10 minutes and still have an active session expiring in 15 minutes for a total of 25 minutes?

    I may need to tweak it a little, the company I work for are pretty serious about PCI. Thanks for the module!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Admin Keepalive Timer [Support Thread]

    Quote Originally Posted by jazzman346 View Post
    I'm getting to this discussion a few months later but I hope it's useful to others.

    I've just implemented the Keepalive Timer module in the admin area and I had the same problem where the keepalive.php page was being called through ajax and kept falling 5 times until the TEXT_KEEPALIVE_SERVER_UNREACHABLE_MESSAGE1 pop-up.

    I found it has to do with the $.ajax timeout value set to 450ms on line 170 in the /admin_area/includes/javascript/jquery.idletimeout.js file.

    Increasing that value to 3000 (3 seconds) solves it for me.

    @DrByte I'm wondering if calling the keepalive.php every minute during 10 minutes isn't defeating the purpose of having a 15 minutes session? Every time the keepalive.php script is being called, I see the expiration time on the session increase.

    If "idleAfter" is set to 600 seconds (10 minutes) before actually being defined as idle, it means the actual session still has 15 minutes to go. So, one can leave its computer idle for 10 minutes and still have an active session expiring in 15 minutes for a total of 25 minutes?

    I may need to tweak it a little, the company I work for are pretty serious about PCI. Thanks for the module!
    Ya, I've been meaning to look at that further. It probably should only do the ajax ping if the user gets the popup and says "ya, i want to continue working".
    Definitely open to code-change suggestions if you've got time to look into it.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Mar 2016
    Location
    Laval, Quebec, Canada
    Posts
    3
    Plugin Contributions
    0

    Default Re: Admin Keepalive Timer [Support Thread]

    Quote Originally Posted by DrByte View Post
    Ya, I've been meaning to look at that further. It probably should only do the ajax ping if the user gets the popup and says "ya, i want to continue working".
    Definitely open to code-change suggestions if you've got time to look into it.
    Good point! I didn't think about changing the code this way but I'll come back to it. I just had too many things to work on beside the idle timeout. My goal will be to create a session timeout into the Front End within a month or two, feature request from my boss.

    So right now, beside changing the jquery.idletimeout.js to 3 seconds, I've set the Admin Session Timeout to 300 seconds (5 minutes).

    I've also changed line 84 of the keepalive_module.php file to :
    Code:
    warningLength: <?php echo SESSION_TIMEOUT_ADMIN-70; ?>, // countdown timer width remaining session time minus polling time (last keepalive call) + 10secs buffer
    That way, I do respect the 15 minutes PCI specs and it seems to work fine. Of course, I'll get feedback from the real admins in the next few weeks.

  6. #6
    Join Date
    Mar 2016
    Location
    Laval, Quebec, Canada
    Posts
    3
    Plugin Contributions
    0

    Default Re: Admin Keepalive Timer [Support Thread]

    Following my last post, I proceeded with my latest release including the Keepalive timer module. It was working so well for me for the last three weeks so I was certain there would be no issue. Unfortunately, there is one -> Admin Profiles. I'm a super user, I can access any pages ... not the regular users. As a result, they get the "We are unable to connect to the server. [...]" pop-up after 5 failed requests (5 minutes) as the keepalive.php page called through AJAX always returns the denied page for them.

    So, the fix for this is simple. We need to put it in the exception pages array on line 49 of the /admin/includes/init_includes/init_admin_auth.php in V1.5.5
    Code:
    if (!in_array($page, array(FILENAME_DEFAULT,FILENAME_ADMIN_ACCOUNT,FILENAME_LOGOFF,FILENAME_ALERT_PAGE,FILENAME_PASSWORD_FORGOTTEN,FILENAME_DENIED,FILENAME_ALT_NAV,FILENAME_KEEPALIVE)) &&
    Then in /includes/filenames.php we need to add the corresponding constant :
    Code:
    define('FILENAME_KEEPALIVE', 'keepalive');

  7. #7
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,838
    Plugin Contributions
    31

    Default Re: Admin Keepalive Timer [Support Thread]

    All the language constants used by this/in ZC156 are defined in the code:
    PHP Code:
    if (!defined('TEXT_TIMEOUT_WARNING')) define('TEXT_TIMEOUT_WARNING''**WARNING**'); 
    1) I assume the correct place for the translations is /extra_definitions?

    2) Is this practice something that will be implemented in the future, or it's a one-off to simplify installation of this particular plugin?
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

 

 

Similar Threads

  1. v154 Will Admin Keepalive Timer work with v154?
    By SilverHD in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 2 Jun 2015, 03:19 PM
  2. v151 question about installing Admin Keepalive Timer Addon
    By SilverHD in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 30 Nov 2014, 11:08 PM
  3. Keepalive Timer and Orders Exporter conflict
    By gjh42 in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 1 Aug 2014, 02:15 PM
  4. Admin Keepalive timer
    By alhakeem2001 in forum Customization from the Admin
    Replies: 5
    Last Post: 22 Dec 2013, 05:12 PM
  5. v151 Blue Admin [Support Thread]
    By vvomble in forum Addon Templates
    Replies: 11
    Last Post: 27 May 2013, 09:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg