Thank you lat9, hope a better version will come up soon. Uhh.. I've just discover 10k log files due to gzuncompress/data issue.
Hi Lat9
An error finally surfaced:
[26-Dec-2017 18:42:44 America/Denver] Request URI: /xxx/Music/Music_Boxes/Taiwan?zenid=lvpjl451vtv5hqdeojomqe5a37, IP address: 66.249.88.60
#1 trigger_error() called at [/home2/sub/public_html/xxx/includes/classes/observers/class.remember_me_observer.php:213]
#2 remember_me_observer->decodeCookie() called at [/home2/sub/public_html/xxx/includes/classes/observers/class.remember_me_observer.php:43]
#3 remember_me_observer->__construct() called at [/home2/sub/public_html/xxx/includes/autoload_func.php:79]
#4 require(/home2/sub/public_html/xxx/includes/autoload_func.php) called at [/home2/sub/public_html/xxx/includes/application_top.php:170]
#5 require(/home2/sub/public_html/xxx/includes/application_top.php) called at [/home2/sub/public_html/xxx/index.php:26]
[26-Dec-2017 18:42:44 America/Denver] PHP Warning: gzuncompress error in decodeCookie, value = deleted, _SERVER[HTTP_USER_AGENT] = Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202, _COOKIE = array (
'zenid' => 'lvpjl451vtv5hqdeojomqe5a37',
'zcrm_cfb3540972e63488d12b5ebb9cd6d91f' => 'deleted',
) in /home2/sub/public_html/xxx/includes/classes/observers/class.remember_me_observer.php on line 213
This error surfaced when a customer's URL was selected from the User Tracking mod:
Country: United States
IP Address: 66.249.88.61 Host: google-proxy-66-249-88-61.google.com Originating URL: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&ved=0CCEQFjAF&url=http%3A%2F%2Fwww.xxx. com%2Fxxx%2Findex.php%3Fmain_page%3Dadvanced_search_result%26search_in_descripti on%3D1%26keyword%3DOccupied%2BJapan&ei=j_pCWrSbFqOhRvVl&u
Thank you
With version 1.5.4, the IP was recorded in user tracking, but no errors showed up. However, firefox was nice and deleted all my saved cookies, so created new with firefox both PC and android phone... Remember me is working currently with no errors. Will see if the offending IP comes back tomorrow.
Spent some time reading up on cookies, interesting ideas both sides of the fence. Downloaded some interesting code for testing, will have to compile and play later.
Dave
Always forward thinking... Lost my mind!
@mikebr, that validates my take on the cause of the issue! @davewest, thanks for the continued testing.
I also have user tracking module.
I installed latest class.remember_me_observer.php on 26 December and no logfiles error today.
Again thank you lat9 and long life zencart community. Happy New year guys.
I've just submitted v1.4.5 of "Remember Me" to the Zen Cart plugins; it will be available here for download once reviewed.
This release contains changes associated with the following GitHub issues:
#10: Correct gzuncompress log-generation (cookies have been deleted).
#11: Disable processing when COWOA/guest checkout is active.
Thanks to @solo_400, @mikebr and @davewest for their help in identifying the problem (and its source) and testing the corrections.
I've not had the same IP, but some new ones pop up without cursing error logs.. I think you got this one covered.. Thanks.
On a side note... I like to share what I did for a added layout style. I moved the checkbox in front of the wording and added a expanding info box. There are other type of info boxes but this takes the lest amount of code.
In the observer class I changed the checkbox script as this:
In the page where the script is used, such as the tpl_login_default.php anywhere near the bottom added the script:Code:public function create_checkbox() { // return ($this->enabled) ? ('<label class="checkboxLabel" for="permLogin" title="' . TEXT_REMEMBER_ME_ALT . '">' . TEXT_REMEMBER_ME . '</label>' . zen_draw_checkbox_field ('permLogin', '1', false, 'id="permLogin"') . '<br class="clearBoth" />') : ''; return ($this->enabled) ? ( zen_draw_checkbox_field ('permLogin', '1', false, 'id="permLogin"') . '<label class="checkboxLabel" for="permLogin" title="' . TEXT_REMEMBER_ME_ALT . '">' . TEXT_REMEMBER_ME . ' <span style="cursor:pointer;color:blue;font-weight:bold;" id="dialogbox" data-text-swap=" [x]"> [?]</span> </label>') : ''; }
Something allot of sites have explaining what the checkbox is for. There are other ways to enhance the hover title/alt tag as will.Code:<script type="text/javascript"> $(document).ready(function () { $( "#dialogbox" ).click(function() { $( ".dialog_group" ).toggle("slow"); var el = $(this); if (el.text() == el.data('text-swap')) { el.text(el.data('text-original')); } else { el.data('text-original', el.text()); el.text(el.data('text-swap')); } }); }); </script>
Dave
Always forward thinking... Lost my mind!
Good idea, @davewest, having some indication as to what is being remembered. I'll add that as a future enhancement.
Bookmarks