Page 86 of 86 FirstFirst ... 3676848586
Results 851 to 856 of 856
  1. #851
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default Re: User tracking mod ZC 1.5.7b / PHP 7.4 Warning: Use of undefined constant

    Quote Originally Posted by mc12345678 View Post
    If I understand correctly there's basically one issue in the above: incomplete attempt to move hard-coded text to a language definition.

    I know that my plan was to change the way that line was generated by using sprintf to plug in the content into the text. I had a couple of reasons to do that, one was to allow other css to be easily incorporated (although possibly in the language define) the other was so that the applicable deleted item could be placed in the language statement as appropriate for the language.

    I'll prep a solution (commit) and post the link to it shortly.
    Please ignore my report about the Admin user still being tracked. I had a typo in my IP in user tracking config. That's what happens when you test at 01H30

    With a fresh set of eyes I spotted that this morning and everything is fine on that front.

    What I don't know is why the warning was generated every time I deleted my admin session last night. I had created the following define in my language file.
    PHP Code:
    define('TEXT_HAS_BEEN_DELETED''IP Address Deleted'); 
    so my output on deleting a session was as expected
    700a338322f4f6b478fefdb512c43e51IP Address Deleted has been deleted.
    This it is the same this morning but I get no warning. No other changes made to my site so strange. At least I now understand why there was no define. I was scratching my head as I could see no way it would make sense having one but I wondered if the lack of one was the cause of my warning so created one.

    Thanks for your prompt replies but as the issue is now only really cosmetic there is no rush to get a fix. I know you have a lot of irons in the fire!

  2. #852
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: User tracking mod ZC 1.5.7b / PHP 7.4 Warning: Use of undefined constant

    Quote Originally Posted by Brent View Post
    Thank you that solved the issue.

    To test I removed my admin IP so it would be tracked. On deleting the record this then highlighted another warning.

    PHP Code:
    [31-Jan-2021 00:40:26 UTCRequest URI: /ADMIN/index.php?cmd=user_trackingIP addressxxx.xxx.xxx.xxx
    #1 require(../ADMIN/user_tracking.php) called at [../ADMIN/index.php:11]
    --> PHP Warning: Use of undefined constant TEXT_HAS_BEEN_DELETED assumed 'TEXT_HAS_BEEN_DELETED' (this will throw an Error in a future version of PHPin ../ADMIN/user_tracking.php on line 267. 
    Line 267
    PHP Code:
        $deleted_session_text $_POST['delsession'] . TEXT_HAS_BEEN_DELETED ' has been deleted. <br />'
    Despite excluding my admin address it is now still being tracked. When I delete I get

    Also there doesn't seem to be a define for TEXT_HAS_BEEN_DELETED in the language file?
    Quote Originally Posted by mc12345678 View Post
    If I understand correctly there's basically one issue in the above: incomplete attempt to move hard-coded text to a language definition.

    I know that my plan was to change the way that line was generated by using sprintf to plug in the content into the text. I had a couple of reasons to do that, one was to allow other css to be easily incorporated (although possibly in the language define) the other was so that the applicable deleted item could be placed in the language statement as appropriate for the language.

    I'll prep a solution (commit) and post the link to it shortly.
    Huh, thought this had been posted several hours ago, which is the/a solution to the issue described as well as how that text was double combined rather than made into two separate and unique defines:

    Remove hardcoded text to define. · mc12345678/User_Tracking@7d35921 (github.com)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #853
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default Re: User tracking mod ZC 1.5.8 / PHP 8.0 PHP Deprecated: Call to deprecated function

    Just installed on 1.5.8 with PHP 8.0 to see how it would function and all seems OK except for the following depreciated warning. Is there an easy fix?

    Code:
     Request URI: /index.php?main_page=index&cPath=317, IP address: x.x.x.x
    #1 trigger_error() called at [/includes/functions/functions_categories.php:775]
    #2 zen_get_categories_name() called at [/includes/classes/observers/class.user_tracking.php:90]
    #3 user_tracking->zen_update_user_tracking() called at [/includes/classes/observers/class.user_tracking.php:30]
    #4 user_tracking->update() called at [/includes/classes/traits/NotifierManager.php:87]
    #5 base->notify() called at [/includes/templates/responsive_classic/common/tpl_main_page.php:267]
    #6 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
    --> PHP Deprecated: Call to deprecated function zen_get_categories_name. Use zen_get_category_name() instead in /includes/functions/functions_categories.php on line 775.

  4. #854
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: User tracking mod ZC 1.5.8 / PHP 8.0 PHP Deprecated: Call to deprecated function

    Quote Originally Posted by Brent View Post
    Just installed on 1.5.8 with PHP 8.0 to see how it would function and all seems OK except for the following depreciated warning. Is there an easy fix?

    Code:
     Request URI: /index.php?main_page=index&cPath=317, IP address: x.x.x.x
    #1 trigger_error() called at [/includes/functions/functions_categories.php:775]
    #2 zen_get_categories_name() called at [/includes/classes/observers/class.user_tracking.php:90]
    #3 user_tracking->zen_update_user_tracking() called at [/includes/classes/observers/class.user_tracking.php:30]
    #4 user_tracking->update() called at [/includes/classes/traits/NotifierManager.php:87]
    #5 base->notify() called at [/includes/templates/responsive_classic/common/tpl_main_page.php:267]
    #6 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
    --> PHP Deprecated: Call to deprecated function zen_get_categories_name. Use zen_get_category_name() instead in /includes/functions/functions_categories.php on line 775.
    Edit /includes/classes/observers/class.user_tracking.php.

    On line 90 of that module, change the function name from zen_get_categories_name to zen_get_category_name.

  5. #855
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default Re: User tracking mod ZC 1.5.8 / PHP 8.0 PHP Deprecated: Call to deprecated function

    Thanks for the quick reply

    That was indeed easy! Change made and functioning perfectly now.

  6. #856
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: User tracking mod ZC 1.5.8 / PHP 8.0 PHP Deprecated: Call to deprecated function

    Quote Originally Posted by Brent View Post
    Just installed on 1.5.8 with PHP 8.0 to see how it would function and all seems OK except for the following depreciated warning. Is there an easy fix?

    Code:
     Request URI: /index.php?main_page=index&cPath=317, IP address: x.x.x.x
    #1 trigger_error() called at [/includes/functions/functions_categories.php:775]
    #2 zen_get_categories_name() called at [/includes/classes/observers/class.user_tracking.php:90]
    #3 user_tracking->zen_update_user_tracking() called at [/includes/classes/observers/class.user_tracking.php:30]
    #4 user_tracking->update() called at [/includes/classes/traits/NotifierManager.php:87]
    #5 base->notify() called at [/includes/templates/responsive_classic/common/tpl_main_page.php:267]
    #6 require(/includes/templates/responsive_classic/common/tpl_main_page.php) called at [/index.php:94]
    --> PHP Deprecated: Call to deprecated function zen_get_categories_name. Use zen_get_category_name() instead in /includes/functions/functions_categories.php on line 775.
    See the following commit for how this function name change/deprecation is incorporated into the distribution: https://github.com/mc12345678/User_T...21f6d3dec9e222
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 86 of 86 FirstFirst ... 3676848586

Similar Threads

  1. User Tracking Mod only shows the Admin Session
    By Griff1324 in forum General Questions
    Replies: 6
    Last Post: 29 May 2008, 10:56 PM
  2. User Tracking Mod issue: repeated Logins: Admin: View Sessions
    By dharma in forum All Other Contributions/Addons
    Replies: 8
    Last Post: 20 Feb 2008, 04:48 AM
  3. Search log mod vs. user tracking
    By ashton0603 in forum General Questions
    Replies: 4
    Last Post: 30 Jan 2008, 08:43 AM
  4. Google Analytics vs User Tracking mod
    By miles in forum General Questions
    Replies: 1
    Last Post: 15 Jun 2007, 10:09 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR