Fantastic!
I updated to v1.5.8 and can confirm I no longer receive any debug errors anywhere. I clicked all around show/hide and did thorough other testing and it works 100% flawless.
Thanks again!
Printable View
Thanks for that feedback. Makes it more compelling to go ahead and submit for review and publishing. As a side note, because you have installed the version 1.5.8 published to github, that you will not receive notification from within your ZC admin of when 1.5.8 has been published to ZC. You can "follow" action on github to get notification of changes that occur there, but I don't expect to do anything more with 1.5.8 between now and publishing to ZC. You will/should get notification of updates that are published to ZC beyond that version based on the version checking settings...
Hi,
I've been using UT since ZC v1.3x without any issues. Last month I installed it on same server for a customer that didn't have it previously and I didn't have issues (it was a ZC upgrade from 1.5.4 to 1.5.5). Now I'm installing it on an upgrade but UT was existant on previous ZC. The issue I'm having is that everything installs fine but the "User Tracking Config" stays on the "Tools" menu and it's going to a 404 page. When I insert the correct link on browser to go to the correct config page I get an incomplete module configuration (see image).
I have uninstalled the db (following your troubleshooting on readme) but doesn't fix the issue.
Attachment 17180
Your troubleshooting "7.4" mentions an alternative installation by patch but I don't see any sql file on the file set. Would you please help me?
Sorry that there remain upgrade issues with the installer. Part of its design was consideration that the software had been updated previously at least up to when I had originally stepped in and had modified the use of the configuration on the tools menu portion. I see now that definitely can not make that assumption.
Further I didn't catch removal/modification of step 7.4.
I have recently also been shown a similar setup result via PM.
My recommended solution was to use the admin/includes/installers/user_tracking/uninstall.sql file omitting the first "line" associated with drop table if exists... and perform that query as many times as necessary in a row: recommend running at least 2 times back-to-back, until the configuration menu appears in the configuration dropdown.
In working with the site, were you able to identify what version was previously installed? This would help to revise the first of the upgrade scripts to prevent reoccurrence of this issue.
For those wondering why the move of the configuration settings away from the tools menu, even though it was previously explained in this forum, basically the old script that handled the UT configuration was nearly identical to the script needed/used for the options in the configuration menu. So much so that as ZC progressed and improved on that script, similar changes were/would be necessary to the script in UT. Forgive me, but that seems like unnecessary additional work and as was discovered with the original script, lead to a potential security issue that would otherwise be corrected by the security conscience developers of ZC. Again, why reinvent the wheel and not just use what already works?
That made the trick! :clap: AWESOME!Quote:
My recommended solution was to use the admin/includes/installers/user_tracking/uninstall.sql file omitting the first "line" associated with drop table if exists... and perform that query as many times as necessary in a row: recommend running at least 2 times back-to-back, until the configuration menu appears in the configuration dropdown.
Here's the info:Quote:
In working with the site, were you able to identify what version was previously installed? This would help to revise the first of the upgrade scripts to prevent reoccurrence of this issue.
Code:Last Modified: 05/27/2015
Should be: User Tracking - Version: 1.5.2
Yes, I saw that post before when installing last month on that customer's store. It actually makes more sense to have it on the Config menu.Quote:
For those wondering why the move of the configuration settings away from the tools menu, even though it was previously explained in this forum, basically the old script that handled the UT configuration was nearly identical to the script needed/used for the options in the configuration menu. So much so that as ZC progressed and improved on that script, similar changes were/would be necessary to the script in UT. Forgive me, but that seems like unnecessary additional work and as was discovered with the original script, lead to a potential security issue that would otherwise be corrected by the security conscience developers of ZC. Again, why reinvent the wheel and not just use what already works?
Thanks for the help. :bow:
Thank you for the report back. Look forward to finding out the existing/previously existing version so that 1) can update the troubleshooting instructions and 2) update the upgrade script to better handle the issues of previous installs. Ultimately that was the thing I was trying to address through use of an "automated" script because there were always so many things that could go wrong and cause install/upgrade issues, but it was always because of some "simple" things.
The uninstall script used to work better also because it would remove all instances, but in review of that script it also had the potential of affecting older systems that had data stored in the configuration group of 0 (ZC used to have three such configuration options and then there was also at least one popular plugin that did as well). Anyways, thank you again for posting both the issue (basically how to reproduce it) and that the proposed solution worked. :)
It's always a pleasure to help back!
So you know... I posted the version info (in case you missed it).
Hi, I have problem with sitemap xml and this plugin, some conflict or other...
I did fresh install zc 1.5.5e then sitemap (it was ok), then this plugin and sitemap xml became bad.
I would try to uninstall this plugin, how can I do? Is there a uninstall sql? In files I didn't find it.
Thank you
This plugin should have zero interface with Sitemap XML. In fact, with the way ZC 1.5.5 is designed, the only file that needs modification to work with this plugin using its full capacity is the admin's footer page. Otherwise no files are modified in the store.
As to an uninstall sql, the uninstall would be located in: YOUR_SECRET_ADMIN/includes/installers/user_tracking. Removal of related files should be performed prior to executing the uninstall script otherwise it will be again installed on the next admin area navigation.
thanks, I uninstalled plugin, I didn't see that was in that directory.
Can I ask a thing please? But the directory youradmin>installer>user tracking and all the files has to be uploaded or not?
Because I uploaded it
The package is designed to provide installation "through the ages" and at various version conditions.
Meaning, as the instructions state, to upload all of the files. The files are arranged in a structure to support uploading for example all of the files that are in the YOUR_ADMIN directory into the folder that represents your_admin. Therefore, as part of the installation operation, every file that is version based within the admin/includes/installers/user_tracking directory will be executed in order. Each file contains either code to be executed or a description of what was changed for that version. Each file serves at least one function: to identify the version of the plugin. Omission of a file could prevent modifications to the system needed to operate the plugin.
The one exception is the uninstall.sql. This is placed and recommended to be present to support some future uninstall that may be desired rather than trying to locate the file in some future point.
thanks for your patience, I tried to install again, but same issue, and I installed other plugins without problems.
At this time I think it is a hosting problem in some way, because on another site both plugins work.
Thank again
Everything is working great on my end, I do every now and then get this error showing up in my Debug log:
[30-Nov-2017 14:15:36 America/Detroit] PHP Notice: CURL error checking plugin versions: 7:Failed to connect to plugins.zen-cart.com port 443: Connection refused
Trying file_get_contents() instead. in /home/webserver/public_html/myadmin/includes/init_includes/init_user_tracking.php on line 136
[30-Nov-2017 14:15:36 America/Detroit] PHP Warning: file_get_contents(https://plugins.zen-cart.com/versioncheck/159): failed to open stream: Connection refused in /home/webserver/public_html/myadmin/includes/init_includes/init_user_tracking.php on line 138
[30-Nov-2017 14:15:36 America/Detroit] PHP Notice: file_get_contents() error checking plugin versions.
Trying http instead. in /home/webserver/public_html/myadmin/includes/init_includes/init_user_tracking.php on line 140
[30-Nov-2017 14:15:36 America/Detroit] PHP Warning: file_get_contents(http://plugins.zen-cart.com/versioncheck/159): failed to open stream: Connection refused in /home/webserver/public_html/myadmin/includes/init_includes/init_user_tracking.php on line 141
[30-Nov-2017 14:15:36 America/Detroit] PHP Notice: file_get_contents() error checking plugin versions.
Aborting. in /home/webserver/public_html/myadmin/includes/init_includes/init_user_tracking.php on line 144
Just wanted to let you know and I'm running v1.5.8.
Thanks!
Brandon
This is a result of the version of version checking that was applied at the time of issue, permissions/setup of the server, and whatever else may have prevented the applicable operation(s). This has been a relatively known issue for some. Newer versions of the version checking (independent of the plugin and incorporated into ZC) use some various methods to perform the check(s). It is possible to pull in the newer version(s) to older ZC installs and therefore bypass the check software currently included. I'd have to look around a little bit to find the file(s) that should be incorporated, but it can also be disabled by changing information in the top of that file. There are some instructions included. What it means is that no notification will be made in using the program of a newer version. But there should be a notification from here about it...
Lastly, thank you for identifying the issue. :)
I've just installed 1.5.8 ( upgarded from 1.4.1 ) and it seems working.
The problem is log directory where I can see many errors as:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed,[errno] => 60))
#1 trigger_error(CURL error checking plugin versions: 60:SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Do you know what problem is ?
PS. I don't use SSL , my ZC version is 1.5.5
[04-Feb-2018 21:40:40] Request URI: /myshop/mydmin/user_tracking.php?gID=1018, IP address:xxxxxxx
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Trying file_get_contents() instead., /myshop path//includes/functions/plugin_support.php, 68, Array ([plugin_file_id] => 159,[version_string_to_compare] => 1.5.8,[new_version_available] => ,[lookup_index] => 0,[url1] => https://plugins.zen-cart.com/versioncheck/159,[url2] => https://www.zen-cart.com/versioncheck/159,[ch] => Resource id #175,[response] => ,[error] => SSL certificate problem, verify that the CA cert is OK. Details:
I have disabled ( update check ) for from User Tracking Config , but still have the errors on log directory.
I believe the errors are reported only when I navigate in Admin pages.
Looks like the certificate associated with your server to be able to communicate with other servers has a problem. (this is different than the SSL certificate one would get to allow customers to connect via https:) yes it will be related to admin navigation as the version check software tends to only be built into admin related operations.
You could try to remove the admin/includes/auto_loaders/config.user_tracking_install.php file. This will prevent user tracking from checking for updates.
Thank you but I only have this file: config.user_tracking.php
deleting I have the same errors.
Trying http instead., /var/www/html/mywebsite/includes/functions/plugin_support.php, 72, Array ([plugin_file_id] => 159,[version_string_to_compare] => 1.5.8,[new_version_available] => ,[lookup_index] => 0,[url1] => https://plugins.zen-cart.com/versioncheck/159,[url2] => https://www.zen-cart.com/versioncheck/159,[ch] => Resource id #175,[response] => ,[error] => SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed,[errno] => 60,[ctx] => Resource id #176,[http_response_header] => Array ([0] => HTTP/1.0 400 Bad Request,[1] => Date: Wed, 07 Feb 2018 10:35:24 GMT,[2] => Server: Apache/2.4.18 (Ubuntu),[3] => Cache-Control: private, must-revalidate,[4] => pragma: no-cache,[5] => expires: -1,[6] => X-RateLimit-Limit: 60,[7] => X-RateLimit-Remaining: 57,[8] => Content-Length: 60,[9] => Connection: close,[10] => Content-Type: application/json)))
#1 trigger_error(file_get_contents() error checking plugin versions.
Trying http instead.) called at [/var/www/html/mywebsite/includes/functions/plugin_support.php:72]
#2 plugin_version_check_for_updates(159, 1.5.8) called at [/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php:164]
#3 require(/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php) called at [/var/www/html/mywebsite/includes/autoload_func.php:48]
#4 require(/var/www/html/mywebsite/includes/autoload_func.php) called at [/var/www/html/mywebsite/myadmin/includes/application_top.php:171]
#5 require(/var/www/html/mywebsite/myadmin/includes/application_top.php) called at [/var/www/html/mywebsite/myadmin/index.php:10]
[07-Feb-2018 12:35:25] PHP Notice: file_get_contents() error checking plugin versions.
Trying http instead. in /var/www/html/mywebsite/includes/functions/plugin_support.php on line 72
[07-Feb-2018 12:35:25] Request URI: /mywebsite/myadmin/index.php, IP address: xxx.xxx.xxx.xxx
, /var/www/html/mywebsite/includes/functions/plugin_support.php, 73, Array ([plugin_file_id] => 159,[version_string_to_compare] => 1.5.8,[new_version_available] => ,[lookup_index] => 0,[url1] => https://plugins.zen-cart.com/versioncheck/159,[url2] => https://www.zen-cart.com/versioncheck/159,[ch] => Resource id #175,[response] => ,[error] => SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed,[errno] => 60,[ctx] => Resource id #176,[http_response_header] => Array ([0] => HTTP/1.0 404 Not Found,[1] => Date: Wed, 07 Feb 2018 10:35:25 GMT,[2] => Server: Apache/2.4.18 (Ubuntu),[3] => Cache-Control: no-cache, private,[4] => Connection: close,[5] => Content-Type: text/html; charset=UTF-8)))
#1 file_get_contents(http://plugins.zen-cart.com/versioncheck/159, , Resource id #176) called at [/var/www/html/mywebsite/includes/functions/plugin_support.php:73]
#2 plugin_version_check_for_updates(159, 1.5.8) called at [/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php:164]
#3 require(/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php) called at [/var/www/html/mywebsite/includes/autoload_func.php:48]
#4 require(/var/www/html/mywebsite/includes/autoload_func.php) called at [/var/www/html/mywebsite/myadmin/includes/application_top.php:171]
#5 require(/var/www/html/mywebsite/myadmin/includes/application_top.php) called at [/var/www/html/mywebsite/myadmin/index.php:10]
[07-Feb-2018 12:35:25] PHP Warning: file_get_contents(http://plugins.zen-cart.com/versioncheck/159): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
in /var/www/html/mywebsite/includes/functions/plugin_support.php on line 73
[07-Feb-2018 12:35:25] Request URI: /mywebsite/myadmin/index.php, IP address: xxx.xxx.xxx.xxx
Aborting., /var/www/html/mywebsite/includes/functions/plugin_support.php, 76, Array ([plugin_file_id] => 159,[version_string_to_compare] => 1.5.8,[new_version_available] => ,[lookup_index] => 0,[url1] => https://plugins.zen-cart.com/versioncheck/159,[url2] => https://www.zen-cart.com/versioncheck/159,[ch] => Resource id #175,[response] => ,[error] => SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed,[errno] => 60,[ctx] => Resource id #176,[http_response_header] => Array ([0] => HTTP/1.0 404 Not Found,[1] => Date: Wed, 07 Feb 2018 10:35:25 GMT,[2] => Server: Apache/2.4.18 (Ubuntu),[3] => Cache-Control: no-cache, private,[4] => Connection: close,[5] => Content-Type: text/html; charset=UTF-8)))
#1 trigger_error(file_get_contents() error checking plugin versions.
Aborting.) called at [/var/www/html/mywebsite/includes/functions/plugin_support.php:76]
#2 plugin_version_check_for_updates(159, 1.5.8) called at [/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php:164]
#3 require(/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php) called at [/var/www/html/mywebsite/includes/autoload_func.php:48]
#4 require(/var/www/html/mywebsite/includes/autoload_func.php) called at [/var/www/html/mywebsite/myadmin/includes/application_top.php:171]
#5 require(/var/www/html/mywebsite/myadmin/includes/application_top.php) called at [/var/www/html/mywebsite/myadmin/index.php:10]
[07-Feb-2018 12:35:25] PHP Notice: file_get_contents() error checking plugin versions.
Aborting. in /var/www/html/mywebsite/includes/functions/plugin_support.php on line 76
------
3 logfiles ( last one above ) when a get into admin.
I think you looked in the wrong directory:
admin/includes/auto_loaders
In a default install of this module, there would be two files beginning with config.user_tracking present.
Also, in the future, please use code tags when posting code. They are generated when clicking the # button in the message box toolbar.
Deletion of a file simply named config.user_tracking.php from either catalog or admin will prevent data collection of the module.
You're right. Thank you very much, problem solved.
Really appreciate you help.
good day.
Actually, not quite. The symptom of the problem has been solved, but the problem is still in a combination of your server's configuration and the plugin_support.php file.
With the following error log:
One can look through the includes/functions/plugin_support.php file and see what is going on (although it is not specifically clear what rendition of ZC 1.5.5 is being used):Code:Trying http instead., /var/www/html/mywebsite/includes/functions/plugin_support.php, 72, Array ([plugin_file_id] => 159,[version_string_to_compare] => 1.5.8,[new_version_available] => ,[lookup_index] => 0,[url1] => https://plugins.zen-cart.com/versioncheck/159,[url2] => https://www.zen-cart.com/versioncheck/159,[ch] => Resource id #175,[response] => ,[error] => SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed,[errno] => 60,[ctx] => Resource id #176,[http_response_header] => Array ([0] => HTTP/1.0 400 Bad Request,[1] => Date: Wed, 07 Feb 2018 10:35:24 GMT,[2] => Server: Apache/2.4.18 (Ubuntu),[3] => Cache-Control: private, must-revalidate,[4] => pragma: no-cache,[5] => expires: -1,[6] => X-RateLimit-Limit: 60,[7] => X-RateLimit-Remaining: 57,[8] => Content-Length: 60,[9] => Connection: close,[10] => Content-Type: application/json)))
#1 trigger_error(file_get_contents() error checking plugin versions.
Trying http instead.) called at [/var/www/html/mywebsite/includes/functions/plugin_support.php:72]
#2 plugin_version_check_for_updates(159, 1.5.8) called at [/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php:164]
#3 require(/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php) called at [/var/www/html/mywebsite/includes/autoload_func.php:48]
#4 require(/var/www/html/mywebsite/includes/autoload_func.php) called at [/var/www/html/mywebsite/myadmin/includes/application_top.php:171]
#5 require(/var/www/html/mywebsite/myadmin/includes/application_top.php) called at [/var/www/html/mywebsite/myadmin/index.php:10]
[07-Feb-2018 12:35:25] PHP Notice: file_get_contents() error checking plugin versions.
Trying http instead. in /var/www/html/mywebsite/includes/functions/plugin_support.php on line 72
[07-Feb-2018 12:35:25] Request URI: /mywebsite/myadmin/index.php, IP address: xxx.xxx.xxx.xxx
, /var/www/html/mywebsite/includes/functions/plugin_support.php, 73, Array ([plugin_file_id] => 159,[version_string_to_compare] => 1.5.8,[new_version_available] => ,[lookup_index] => 0,[url1] => https://plugins.zen-cart.com/versioncheck/159,[url2] => https://www.zen-cart.com/versioncheck/159,[ch] => Resource id #175,[response] => ,[error] => SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed,[errno] => 60,[ctx] => Resource id #176,[http_response_header] => Array ([0] => HTTP/1.0 404 Not Found,[1] => Date: Wed, 07 Feb 2018 10:35:25 GMT,[2] => Server: Apache/2.4.18 (Ubuntu),[3] => Cache-Control: no-cache, private,[4] => Connection: close,[5] => Content-Type: text/html; charset=UTF-8)))
#1 file_get_contents(http://plugins.zen-cart.com/versioncheck/159, , Resource id #176) called at [/var/www/html/mywebsite/includes/functions/plugin_support.php:73]
#2 plugin_version_check_for_updates(159, 1.5.8) called at [/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php:164]
#3 require(/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php) called at [/var/www/html/mywebsite/includes/autoload_func.php:48]
#4 require(/var/www/html/mywebsite/includes/autoload_func.php) called at [/var/www/html/mywebsite/myadmin/includes/application_top.php:171]
#5 require(/var/www/html/mywebsite/myadmin/includes/application_top.php) called at [/var/www/html/mywebsite/myadmin/index.php:10]
[07-Feb-2018 12:35:25] PHP Warning: file_get_contents(http://plugins.zen-cart.com/versioncheck/159): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found
in /var/www/html/mywebsite/includes/functions/plugin_support.php on line 73
[07-Feb-2018 12:35:25] Request URI: /mywebsite/myadmin/index.php, IP address: xxx.xxx.xxx.xxx
Aborting., /var/www/html/mywebsite/includes/functions/plugin_support.php, 76, Array ([plugin_file_id] => 159,[version_string_to_compare] => 1.5.8,[new_version_available] => ,[lookup_index] => 0,[url1] => https://plugins.zen-cart.com/versioncheck/159,[url2] => https://www.zen-cart.com/versioncheck/159,[ch] => Resource id #175,[response] => ,[error] => SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed,[errno] => 60,[ctx] => Resource id #176,[http_response_header] => Array ([0] => HTTP/1.0 404 Not Found,[1] => Date: Wed, 07 Feb 2018 10:35:25 GMT,[2] => Server: Apache/2.4.18 (Ubuntu),[3] => Cache-Control: no-cache, private,[4] => Connection: close,[5] => Content-Type: text/html; charset=UTF-8)))
#1 trigger_error(file_get_contents() error checking plugin versions.
Aborting.) called at [/var/www/html/mywebsite/includes/functions/plugin_support.php:76]
#2 plugin_version_check_for_updates(159, 1.5.8) called at [/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php:164]
#3 require(/var/www/html/mywebsite/myadmin/includes/init_includes/init_user_tracking.php) called at [/var/www/html/mywebsite/includes/autoload_func.php:48]
#4 require(/var/www/html/mywebsite/includes/autoload_func.php) called at [/var/www/html/mywebsite/myadmin/includes/application_top.php:171]
#5 require(/var/www/html/mywebsite/myadmin/includes/application_top.php) called at [/var/www/html/mywebsite/myadmin/index.php:10]
[07-Feb-2018 12:35:25] PHP Notice: file_get_contents() error checking plugin versions.
Aborting. in /var/www/html/mywebsite/includes/functions/plugin_support.php on line 76
For example the ZC 1.5.5f version of that file has been rewritten to use an overrideable admin class and does not include quite the same checks as seen in the above path. It also shows that there are modifications coming to the plugin version check capability to require some specific information be sent to the server in order to respond with appropriate data (that is addressed/covered in the VersionServer class). Anyways, either there is something wrong with your server, there are restrictions in place that prevent any of the four methods in your plugin_support file from doing a version check and or when the file is in place there is either a database define missing or the plugin check setting in the admin for user tracking was on and should be turned off until the above issue is resolved by some other means... (ie. Upgrade the plugin check process to what is used by ZC 1.5.5f, the entire store to that version, etc...)
Thank you. My ZC version is (You are presently using: v1.5.5) without any letter ( a or f ) . I would say first 1.5.5 version.
My server is for testing purpose and is not hosted by any provider. Could be this the real problem ?
I hope in not having any issue when I put the new user tracking on live server.
Well regardless of having a host or not, the system on which it is currently installed is having some form of an issue executing the communication outside. Local servers though would tend to have the issue. If your live site is able to check for updates without error, then the version checking performed by this module is expected to also have no issues.
Having 1.5.5 only at the top right does indicate that the software version currently installed is reported to be 1.5.5 (no sub-version). There have been 6 cases of changes to that software made since then and it would be advised to incorporate those changes by a one time upgrade to 1.5.5f if continuing to work with 1.5.5 of any version.
I installed this mod on afresh installation of Zen Cart 1.5.5f, I added the lines of code for the admin and the storefront
<?php $zco_notifier->notify('NOTIFY_ADMIN_FOOTER_END'); ?>
and
<?php $zco_notifier->notify('NOTIFY_FOOTER_END'); ?>
respectively, but i am only tracking admin pages and no tracking of storefront pages.
Another problem i am getting not found when i click on"User Tracking Config",I searched the mod files but i could not find the file user_tracking_config.php, Where is it located?
In ZC 1.5.5, there is no additional action for the catalog side (ie. do not have to do anything to add $zco_notifier->notify('NOTIFY_FOOTER_END', $current_page_base); which is located in includes/templates/template_default/common/tpl_main_page.php and includes/templates/responsive_classic/common/tpl_main_page.php
As to User Tracking Config, that feature is added as part of the installation which generates configuration options to be selected from the configuration menu. As stated in a thread where installation appeared to occur continuously the install files need to be installed in their correct location (and also not in their incorrect location) to be able to perform the installation one time and one time only... Again, request to verify that the files located within the YOUR_ADMIN directory are not also duplicated to the catalog side.
For example, the following files should not be found on the catalog side:
includes/auto_loaders/config.user_tracking_install.php
includes/init_includes/init_user_tracking.php
includes/languages/english/user_tracking.php
includes/languages/english/extra_definitions/user_tracking.php
Also, the following files should be removed from the admin side of the store if a previous version had been installed. In particular if the server does not support/allow unlinking (deleting) files by code. The most recent
version does not include code files that were previously included as the code has been moved into other areas. Which if this is/was a fresh install of ZC with a fresh install of User tracking (no database entries existing from a previous version), then the only database related action of the version install would be to update the version number and none of the actions in the 1.5.8.php version file would be executed.
So more specifically: admin/init_includes/init_user_tracking.php initiates the install process and then it is in the version 1.5.3 installer where the configuration menu is first installed and it is then edited as necessary in later versions.
I just downloaded the plugin again, unzipped it, change
"YOURADMIN" to my admin Directory name, Dragged the 2 folders (includes and admin) to the root of my store and the same result again.
Also i got some extra this time and these will load on top of the admin page unless i delete the files from Admin/includes/installers/user_tracking/*.*
Ok, so let's go a little more systematically.
Please identify all of the files located in the following directories:
catalog/includes/auto_loaders
catalog/init_includes
I just installed it on a ZC 1.5.5a site, received an initial report upon first admin navigation, but did not receive any further user tracking notifications.
Problem Solved.
I uninstalled the database configuration using the SQL provided with the mod and installed again. Thanks.
Unfortunately, some of the earlier installation process steps had a tendency to leave behind some remnants that could get in the way of an upgrade install where it may not have been realized to be an upgrade... ie. if the software had previously been installed or attempted to be installed to the database, but then not fully removed (even if the removal instruction of the time were followed). Happens and why it is part of the instructions when problems have been identified with installation and why it was suggested in the previous referenced thread.
Will this plugin run on ZC 1.5.6?
Yes and no... I installed it to a store that is running PHP 7.2 and strict error reporting and had a few debug logs to address. I did also notice that the visualization of the results needed something other than the default store's table structure. At any rate, I've updated github for the moment to account for all of the minor notifications provided and to add in a table structure that at least provides a way to sensibly look at the data. Should be modified to use more of a responsive design, but haven't worked on that yet...
Anyways, latest test of it can be seen: [FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]https://github.com/mc12345678/User_Tracking
Currently Version 1.5.9 on GitHub.
I hadn't yet updated the geoip data nor added flags for a few of the newly identified countries... As usual, the instructions have not yet been updated significantly. I have roughly identified in the installation file what has been modified in the package.
[/FONT]
Note that the READFIRST.txt file references an upgrading document which no longer exists.
The data collected by this mod seems to grow without bounds - has there been any consideration to trimming the user_tracking table? Perhaps more recent versions of this mod already do this and I'm looking at old code?
I was hoping for something automatic.
Is on a todo list, though have always wondered to what extent it would occur: every admin page change, every visit by a visitor, when the plugin is activated to see the results? Even with that, say if someone wanted to keep data for a relatively extended period, once a month, once a week, etc...
Make it cron capable only? So many options, positive and negative.
Noodle on it as a suggestion. The reason it came up is that someone had an old user_tracking table (likely created in 1.3.x) but a 1.5 installation without the software, so I had no way of getting in an trimming the table from the admin (it's easy enough to use phpMyAdmin of course, which is what I wound up doing).
It appears to be capturing data; however, as session data handling has changed through PHP versions, it appears that there needs to be a little modification to support display of the tracking "history" of a given session... I tried on ZC 1.5.7b with PHP 7.3 and there were a few myDEBUG logs generated at least on the admin side. One was because an array's key did not exist at that time of accessing. The other was because of the session handling issue in trying to show the individual status of user's and the "old" session handling.
During installation, didn't have any logs generated and only came across an issue when I tried to "View" the session history of any of the records. Means, that the plugin could be installed; however, some of the features are not yet fully available immediately until the session "unpacking" is corrected... Will setup a github issue (#4) and try to resolve shortly.
But then... I just accessed it again and it is working fine... *rolling eyes* thinking that *that* issue may be related to my server... Still I plan to look over it a little more anyways...
Fyi and fwiw, while I didn't find a "convenient" way to rework the session decoding issue, I am incorporating the use of the WhosOnline class that was brought into ZC 1.5.7 such that if it exists it overrides the former process... What this means is that presuming that the old method worked for older ZC versions, the new code will still work there as well. BUT, if one forgets to include or chooses to exclude that class, then there are situations where the admin will get logged out when viewing the User Tracking page.
Swguy, I also have moved the delete "process" to a method within the observer class so that it may be called from outside of the main body of the User Tracking admin panel. I would like to consider making it part of the "routine" daily check such as with new, featured, sale like product. At least that way the load is low in "routine" site usage rather than on each page load on either the catalog or admin sides. Such an option though does make it a little more difficult to "control" who can make that possible, but its something that has been made more available.
Just uploaded version 1.5.10 for review:
Download location will be at/near: User Tracking - Zen Cart Plugins (zen-cart.com)Code:Updated 01/02/2020 Version 1.5.10 mc12345678:
1. Addressed strict error reporting associated with admin_id as an array key.
2. Verified operational in ZC 1.5.7. up to PHP 7.3.
3. Revised the display of session data so that the date/time was not wrapped and allowed the URI to be displayed over a longer row.
4. Added javascript to bring the selected session to view.
5. Began using array variable to simplify consistent modification of page html.
6. Added ability to disable display of admin activity.
7. Refactored the observer class. Eliminated excess else statements.
8. Moved code to a variable assignment instead of processing within a function.
9. Made use of some of the unused internal variables.
10. Removed redundant checks against the value of some global variables.
11. Added database removal code to observer so can be used more robustly, even possibly automatically.
12. Simplified zen_check_bot function.
13. Updated the installer to remove variable $current_version, ensure operation,
14. provide compatibility for longer version identifiers,
Break with the old. Pick a ZC version for the new release to work with and abandon the old ones. Let the older releases of the plugin serve those using outdated ZC versions.
They're soon not going to be able to run older ZC versions anyway because PHP keeps moving forward (as does the rest of the ecommerce ecosystem). They can (and should anyway) upgrade their ZC version if they need to benefit from the newer plugin version.
This will cut down on the maintenance time required for supporting/upgrading plugins, since it won't be ultra-fragile by trying to support tooooo many old versions. The added benefit then is that you'll have time to support/update more plugins because the burden/load will be less.
Even sitting here with four iPads I cannot use in our business any longer because they do not support the latest iOS, I agree with DrByte.
You can't and shouldn't have to be everything to everyone. 1.5.7 is a great choice for a new starting point.
My issue with what needed to be done is that I had only wanted very specific information "introduced" through session swapping. That was what worked in older "versions" (PHP most likely the "culprit"). The new class offers the desired/needed information but also includes other data as well. It does that efficiently and without additional code so a great resource and no additional/independent coding and actually solved/addresses other concerns.
That said, there was a change in this version that I recommend others to incorporate. I'm surprised I hadn't thought about it or addressed it a long time ago, but while I was testing the changes and even providing some modifications to how the class internally worked I realized that the change was needed.
If anything, I really look forwards to when just PHP 7.x (or above) can be used, though even within that series of PHP there are some great changes that can only be implemented at/above certain PHP levels. I don't like to code with PHP versioning logic within the code(though that hasn't stopped me from doing it)when something exists to support the span of permissable versions. Some of that coding too can't be done without significant duplication or unnecessary logic (test if php version, perform analysis and set a variable's value based on that logic, complete the test bracket and use the result of that variable in a "larger" piece of logic... Blah... too much though something similar is done in this release when evaluating the presence of the WhosOnline class.)
I am an overachiever and prefer to be able to provide something that works as "described", so yes I know that I strive to go above and beyond. I *do* plan to be working towards reduced past compatibility especially with the fall off of PHP 5.x support.
Works like a charm on my 1.5.7.0. Thanks so much :smile:
ZC 1.5.7b
PHP 7.4.14
Looking at my User Tracking logs for the IPs that generate this warning it seems to happen with invalid urls. The user ends up on the "Sorry, the product was not found."Code:[30-Jan-2021 08:03:14 UTC] Request URI: ../index.php?main_page=product_info&products_id=1006, IP address: xxx.xxx.xxx.xxx
#1 user_tracking->zen_update_user_tracking() called at [../includes/classes/observers/class.user_tracking.php:30]
#2 user_tracking->update() called at [../includes/classes/class.base.php:118]
#3 base->notify() called at [../includes/templates/CUSTOM/common/tpl_main_page.php:267]
#4 require(../includes/templates/CUSTOM/common/tpl_main_page.php) called at [../index.php:94]
--> PHP Warning: Use of undefined constant NAVBAR_TITLE - assumed 'NAVBAR_TITLE' (this will throw an Error in a future version of PHP) in ../includes/classes/observers/class.user_tracking.php on line 99.
In this example it was caused bywhich should have beenQuote:
/index.php?main_page=product_info&products_id=1006
orQuote:
/index.php?main_page=product_info&products_id=1006
.Quote:
/index.php?main_page=product_info&products_id=1006
In my case this is the incoming landing url so I can't do anything to fix this but would like to find a solution for the PHP warning if possible. This is line 99 from class.user_tracking.php
PHP Code:
$page_desc = defined('HEADING_TITLE') ? HEADING_TITLE : (IS_ADMIN_FLAG !== true ? NAVBAR_TITLE : "");
So, I the "old days" it seemed like every page that could possibly be landed on on the catalog side had NAVBAR_TITLE defined and that basically none of the admin pages did... As such, it seemed "right" to use a rule that worked that way...
Guess not the case.
Would suggest changingIn that line to:Code:IS_ADMIN_FLAG !== true
Code:defined('NAVBAR_TITLE')
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.
Line 267PHP Code:
[31-Jan-2021 00:40:26 UTC] Request URI: /ADMIN/index.php?cmd=user_tracking, IP address: xxx.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 PHP) in ../ADMIN/user_tracking.php on line 267.
Despite excluding my admin address it is now still being tracked. When I delete I getPHP Code:
$deleted_session_text = $_POST['delsession'] . TEXT_HAS_BEEN_DELETED . ' has been deleted. <br />';
Also there doesn't seem to be a define for TEXT_HAS_BEEN_DELETED in the language file?Quote:
77ca6d2efef563fca5f494ebf137698fTEXT_HAS_BEEN_DELETED has been deleted.
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 :blush:
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.so my output on deleting a session was as expectedPHP Code:
define('TEXT_HAS_BEEN_DELETED', 'IP Address 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. :blink: 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.Quote:
700a338322f4f6b478fefdb512c43e51IP Address Deleted has been deleted.
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!
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)
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.
Thanks for the quick reply :smile:
That was indeed easy! Change made and functioning perfectly now.
See the following commit for how this function name change/deprecation is incorporated into the distribution: https://github.com/mc12345678/User_T...21f6d3dec9e222
Hi, will the latest version be compatible with v2.0+?
Not yet sure what changes need to be made, but as memory serves it does use some of the cookie/session related functionality that has changed to catch up with current operations.
I know also it is possible for this to be improved for capturing admin related operations by tracking whether a record is related to the catalog versus admin. Doing so wouldn't be as descriptive in a multi admin store, but has other benefits.
I expect there would be at least a logged message about the admin screen not using the associated header like file.