addon keyword capturing bugs
[Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here.
And, remove this comment before actually posting!]
site:https://heelsbags.com
Database Engine: MySQL 5.6.51-cll-lve
HTTP Server: Apache
PHP Version: 8.1.21 (Zend: 4.1.21)
zen cart v1.5.8a
plugins:
Zen Colorbox
Ultimate URLs 3.1.0
SitemapXML 3.9.9
Easy Populate 4
Database Backup Manager - MySQL
Image Handler5 Version: 5.3.4
addon keyword capturing
[20-Aug-2023 14:40:15 UTC] PHP Deprecated: Optional parameter $keyword declared before required parameter $num_results is implicitly treated as a required parameter in /home/..../public_html/heelsbags/includes/classes/observers/class.addon_keyword_capturing.php on line 40:
function record_keyword($keyword = false, $num_results)
help me please
Re: addon keyword capturing bugs
So you're using this (https://www.zen-cart.com/downloads.php?do=file&id=2042) plugin that was last updated in 2018 for Zen Cart 1.5.6 and you're expecting it to operate properly with the updated versions of Zen Cart and PHP?
Re: addon keyword capturing bugs
for this error, you can change line 40:
PHP Code:
// from
function record_keyword($keyword = false, $num_results){
//to
function record_keyword($keyword = false, $num_results = 1) {
best.
Re: addon keyword capturing bugs
Quote:
Originally Posted by
carlwhat
for this error, you can change line 40:
PHP Code:
// from
function record_keyword($keyword = false, $num_results){
//to
function record_keyword($keyword = false, $num_results = 1) {
best.
thank your very much,this error was fixed.
but another display:
[21-Aug-2023 00:35:22 UTC] Request URI: /admin/addon_keyword_capturing.php, IP address: 246.132.211.160, Language id 1
#0 /home/..../public_html/heelsbags/admin/addon_keyword_capturing.php(177): zen_debug_error_handler()
--> PHP Warning: Undefined variable $sLimit in /home/.../public_html/heelsbags/admin/addon_keyword_capturing.php on line 177.
HTML Code:
[PHP] <?php
#RESOLVE LIMIT OF ENTRIES PER REPORT
$selected = array('','','');
if($sLimit){ //177 line
switch($limit){
case '25':
$selected[0] = ' selected=selected';
break;
case '50':
$selected[1] = ' selected=selected';
break;
case '100':
$selected[2] = ' selected=selected';
break;
default:
$selected[0] = ' selected=selected';
}
}else{
$limit = 500;
$selected[0] = ' selected=selected';
}
?>[/PHP]
and i have try if($sLimit){ to if($Limit){
but display error always
"//177 line" only for you in here,and no it in code
Re: addon keyword capturing bugs
it looks like it should be:
PHP Code:
//from
if($sLimit){
// to
if($limit) {
best.
Re: addon keyword capturing bugs
Quote:
Originally Posted by
carlwhat
it looks like it should be:
PHP Code:
//from
if($sLimit){
// to
if($limit) {
best.
Thanks,but another error:
[21-Aug-2023 13:51:55 UTC] Request URI: /index.php?main_page=search_result&search_in_description=1&keyword=dahua, IP address: 246.132.211.160, Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 /home/.../public_html/heelsbags/includes/classes/observers/class.addon_keyword_capturing.php(47): parse_str()
#2 /home/.../public_html/heelsbags/includes/classes/observers/class.addon_keyword_capturing.php(34): addon_keyword_capturing->record_keyword()
#3 /home/.../public_html/heelsbags/includes/classes/traits/NotifierManager.php(87): addon_keyword_capturing->update()
#4 /home/.../public_html/heelsbags/includes/modules/pages/search_result/header_php.php(451): base->notify()
#5 /home/.../public_html/heelsbags/index.php(35): require('/home/g67mwiq1l...')
--> PHP Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /home/.../public_html/heelsbags/includes/classes/observers/class.addon_keyword_capturing.php on line 47.
if($results->RecordCount() == 0){ #USER IS NOT FROM EXCLUDED IP
parse_str(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $parameters_array); #GET REFERING PAGE's PARAMETERS
$timestamp = date("Y-m-d H:i:s");
if(isset($_SERVER['HTTP_USER_AGENT'])) {
$agent = $_SERVER['HTTP_USER_AGENT'];
Re: addon keyword capturing bugs
[21-Aug-2023 14:04:16 UTC] Request URI: /admin/index.php?cmd=addon_keyword_capturing, IP address: 246.132.211.160, Language id 1
#0 /home/../public_html/heelsbags/admin/addon_keyword_capturing.php(177): zen_debug_error_handler()
#1 /home/../public_html/heelsbags/admin/index.php(11): require('/home/g67mwiq1l...')
--> PHP Warning: Undefined variable $Limit in /home/../public_html/heelsbags/admin/addon_keyword_capturing.php on line 177.
Re: addon keyword capturing bugs
with regards to line 47 above, you can try:
PHP Code:
// from
parse_str(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $parameters_array); #GET REFERING PAGE's PARAMETERS
//to
parse_str((parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY) ?? ''), $parameters_array); #GET REFERING PAGE's PARAMETERS
that one may be trickier to debug.
Quote:
Originally Posted by
targetmarts
[21-Aug-2023 14:04:16 UTC] Request URI: /admin/index.php?cmd=addon_keyword_capturing, IP address: 246.132.211.160, Language id 1
#0 /home/../public_html/heelsbags/admin/addon_keyword_capturing.php(177): zen_debug_error_handler()
#1 /home/../public_html/heelsbags/admin/index.php(11): require('/home/g67mwiq1l...')
--> PHP Warning: Undefined variable $Limit in /home/../public_html/heelsbags/admin/addon_keyword_capturing.php on line 177.
i would suggest reading this complete thread as the solution as already been provided.
best.
Re: addon keyword capturing bugs
Quote:
Originally Posted by
carlwhat
with regards to line 47 above, you can try:
PHP Code:
// from
parse_str(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $parameters_array); #GET REFERING PAGE's PARAMETERS
//to
parse_str((parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY) ?? ''), $parameters_array); #GET REFERING PAGE's PARAMETERS
that one may be trickier to debug.
i would suggest reading this complete thread as the solution as already been provided.
best.
ok,thanks
This error problem is indeed quite frustrating and seems difficult to solve. Apart from the inability to select the display quantity on the management page, there are no other issues and the impact is not significant.
So how to set this plugin to not generate error records?
[21-Aug-2023 14:04:16 UTC] Request URI: /admin/index.php?cmd=addon_keyword_capturing, IP address: 246.132.211.160, Language id 1
#0 /home/../public_html/heelsbags/admin/addon_keyword_capturing.php(177): zen_debug_error_handler()
#1 /home/../public_html/heelsbags/admin/index.php(11): require('/home/g67mwiq1l...')
--> PHP Warning: Undefined variable $Limit in /home/../public_html/heelsbags/admin/addon_keyword_capturing.php on line 177.
Re: addon keyword capturing bugs
you really have misread what i wrote.
$Limit is wrong.
you need:
$limit
capital L v small case l.
i was referring to the SERVER REFERRER when i was speaking about tricky.
good luck solving your problems.