Forums / Bug Reports / deleting categories sometimes throws error "Undefined variable $skip_sale_id"

deleting categories sometimes throws error "Undefined variable $skip_sale_id"

Views: 1,063

Results 1 to 4 of 4
10 Jul 2025, 3:52 PM
#1
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

deleting categories sometimes throws error "Undefined variable $skip_sale_id"

Hi all,
While cleaning up a new shop (copy of an old shop) by deleting categories, I occasionally ran into a blank page when deleting a category, and on checking logs, noticed the following errors displayed in such cases:

[10-Jul-2025 23:42:37 Asia/Tokyo] Request URI: /<admin>/index.php?cmd=category_product_listing&action=delete_category_confirm&cPath=, IP address: 192.168.x.x, Language id 1
#0 /<path>/includes/functions/functions_categories.php(1189): zen_debug_error_handler()
#1 /<path>/<admin>/category_product_listing.php(174): zen_remove_category()
#2 /<path>/<admin>/index.php(16): require('...')
--> PHP Warning: Undefined variable $skip_sale_id in /<path>/includes/functions/functions_categories.php on line 1189.

[10-Jul-2025 23:42:37 Asia/Tokyo] Request URI: /<admin>/index.php?cmd=category_product_listing&action=delete_category_confirm&cPath=, IP address: 192.168.x.x, Language id 1
#0 /<path>/includes/functions/functions_categories.php(1189): zen_debug_error_handler()
#1 /<path>/<admin>/category_product_listing.php(174): zen_remove_category()
#2 /<path>/<admin>/index.php(16): require('...')
--> PHP Warning: Undefined variable $skip_sale_id in /<path>/includes/functions/functions_categories.php on line 1189.
```Retrying after a while did manage to delete the category in question, so this is not any kind of blocker.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

10 Jul 2025, 5:33 PM
#2
lat9 avatar

lat9

Administrator

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

Re: deleting categories sometimes throws error "Undefined variable $skip_sale_id"

A PHP Warning doesn't normally result in a whitepage. Are there any PHP Fatal errors logged?

10 Jul 2025, 5:37 PM
#3
lat9 avatar

lat9

Administrator

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

Re: deleting categories sometimes throws error "Undefined variable $skip_sale_id"

Note that the PHP Warning posted was corrected post-zc210 release via this GitHub PR: https://github.com/zencart/zencart/pull/7125

11 Jul 2025, 7:49 AM
#4
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Re: deleting categories sometimes throws error "Undefined variable $skip_sale_id"

Hello @lat9
Thank you for the notice of the GitHub correction, I will apply that.
No, there was no other log associated with this.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0