If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Admin Tools / addon keyword capturing bugs

addon keyword capturing bugs

Started by targetmarts on 20 Aug 2023, 2:49 PM · Views: 1,979

Results 1 to 11 of 11
20 Aug 2023, 2:49 PM
#1
targetmarts avatar

targetmarts

Zen Follower

Join Date:
Jan 2018
Posts:
122
Plugin Contributions:
0

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

20 Aug 2023, 3:18 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

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?

20 Aug 2023, 3:55 PM
#3
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: addon keyword capturing bugs

for this error, you can change line 40:

// from
    function record_keyword($keyword = false, $num_results){
//to
    function record_keyword($keyword = false, $num_results = 1) {

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

21 Aug 2023, 12:38 AM
#4
targetmarts avatar

targetmarts

Zen Follower

Join Date:
Jan 2018
Posts:
122
Plugin Contributions:
0

Re: addon keyword capturing bugs

carlwhat:

for this error, you can change line 40:

// 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
[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

21 Aug 2023, 2:27 AM
#5
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: addon keyword capturing bugs

it looks like it should be:

//from
if($sLimit){
// to
if($limit) {

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

21 Aug 2023, 1:55 PM
#6
targetmarts avatar

targetmarts

Zen Follower

Join Date:
Jan 2018
Posts:
122
Plugin Contributions:
0

Re: addon keyword capturing bugs

carlwhat:

it looks like it should be:

//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'];
21 Aug 2023, 2:13 PM
#7
targetmarts avatar

targetmarts

Zen Follower

Join Date:
Jan 2018
Posts:
122
Plugin Contributions:
0

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.

22 Aug 2023, 12:51 AM
#8
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: addon keyword capturing bugs

with regards to line 47 above, you can try:

// 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.

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.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

22 Aug 2023, 2:14 AM
#9
targetmarts avatar

targetmarts

Zen Follower

Join Date:
Jan 2018
Posts:
122
Plugin Contributions:
0

Re: addon keyword capturing bugs

carlwhat:

with regards to line 47 above, you can try:

// 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.
22 Aug 2023, 3:07 AM
#10
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

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.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

22 Aug 2023, 3:09 PM
#11
targetmarts avatar

targetmarts

Zen Follower

Join Date:
Jan 2018
Posts:
122
Plugin Contributions:
0

Re: addon keyword capturing bugs

carlwhat:

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.

oh,thanks and sorry for my mistake.
sure it work fine now.thanks again.