Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Coupons] Crash on opening coupons if there's a coupon with >1 product variations #6509

Closed
1 task done
pachlava opened this issue May 13, 2022 · 0 comments · Fixed by #6515
Closed
1 task done

[Coupons] Crash on opening coupons if there's a coupon with >1 product variations #6509

pachlava opened this issue May 13, 2022 · 0 comments · Fixed by #6515
Labels
feature: coupons Related to coupons for a store. type: bug A confirmed bug. type: crash The worst kind of bug.

Comments

@pachlava
Copy link
Contributor

Describe the bug
If there's a coupon containing more than one product variation:

Screenshot 2022-05-13 at 13 12 42

The app will crash on opening the coupons screen:

Screen.Recording.2022-05-13.at.13.08.53.mov

To Reproduce

  1. Make sure you have Coupons Management enabled in beta features
  2. Make sure you have a variable product with at least one variation
  3. Create a coupon via website and add both variations in the Usage restrictions of the coupon
  4. Open the coupons screen in the app ~> it will crash

Expected behaviour
I'd expect no crash in these circumstances.

Isolating the problem (mark completed items with an [x]):

  • I can reproduce this bug consistently using the steps above.

Mobile Environment
Please include:

  • Device: Samsung A31 on Android 10 / Pixel 2 XL Emulator on Android 11
  • WooCommerce Android version: 9.1-rc-1

WordPress Environment

``` ### WordPress Environment ###

WordPress address (URL): https://pachlavastore.wpcomstaging.com
Site address (URL): https://pachlavastore.wpcomstaging.com
WC Version: 6.4.1
REST API Version: ✔ 6.4.1
WC Blocks Version: ✔ 7.2.2
Action Scheduler Version: ✔ 3.4.0
WC Admin Version: ✔ 3.3.2
Log Directory Writable: ✔
WP Version: 5.9.3
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
External object cache: ✔

Server Environment

Server Info: nginx
PHP Version: 7.4.29
PHP Post Max Size: 2 GB
PHP Time Limit: 1200
PHP Max Input Vars: 6144
cURL Version: 7.82.0
OpenSSL/1.1.1n

SUHOSIN Installed: –
MySQL Version: 5.5.5-10.4.24-MariaDB-log
Max Upload Size: 2 GB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 6.5.0
WC Database Prefix: wp_
Total Database Size: 4.86MB
Database Data Size: 3.33MB
Database Index Size: 1.53MB
wp_woocommerce_sessions: Data: 0.05MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.02MB + Index: 0.13MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_options: Data: 0.28MB + Index: 0.06MB + Engine InnoDB
wp_postmeta: Data: 2.03MB + Index: 0.06MB + Engine InnoDB
wp_posts: Data: 0.09MB + Index: 0.06MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB

Post Type Counts

amp_validated_url: 1
attachment: 8
jetpack_migration: 2
jp_img_sitemap: 6
jp_sitemap: 6
jp_sitemap_master: 6
nav_menu_item: 1
page: 6
product: 5
product_variation: 1
revision: 2
shop_coupon: 7
shop_order: 14
shop_order_refund: 2

Security

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

Active Plugins (13)

Akismet Anti-Spam: by Automattic – 4.2.3
AMP: by AMP Project Contributors – 2.2.4
CoBlocks: by GoDaddy – 2.23.0
Crowdsignal Forms: by Automattic – 1.6.1
WordPress.com Editing Toolkit: by Automattic – 3.32763
Gutenberg: by Gutenberg Team – 13.1.0
Jetpack: by Automattic – 11.0-a.5
Layout Grid: by Automattic – 1.8.1
Page Optimize: by Automattic – 0.5.2
Crowdsignal Polls & Ratings: by Automattic
Inc. – 3.0.7

WooCommerce Stripe Gateway: by WooCommerce – 6.3.0
WooCommerce Stripe Dev Tools: by –
WooCommerce: by Automattic – 6.4.1

Inactive Plugins (1)

Classic Editor: by WordPress Contributors – 1.6.2

Dropin Plugins (2)

advanced-cache.php: advanced-cache.php
object-cache.php: Memcached

Must Use Plugins (1)

WP.com Site Helper: by –

Settings

API Enabled: –
Force SSL: –
Currency: USD ($)
Currency Position: right_space
Thousand Separator:
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –

WC Pages

Shop base: #8 - /shop/
Cart: #9 - /cart/
Checkout: #10 - /checkout/
My account: #11 - /my-account/
Terms and conditions: ❌ Page not set

Theme

Name: Blank Canvas
Version: 1.2.10-wpcom
Author URL: https://automattic.com/
Child Theme: ✔
Parent Theme Name: Seedlet
Parent Theme Version: 1.1.20-wpcom
Parent Theme Author URL: https://automattic.com/
WooCommerce Support: ✔

Templates

Overrides: –

Action Scheduler

Complete: 35
Oldest: 2022-04-13 23:41:38 +0300
Newest: 2022-05-13 12:53:04 +0300

Failed: 2
Oldest: 2022-03-09 17:49:04 +0200
Newest: 2022-03-09 17:49:04 +0200

Status report information

Generated at: 2022-05-13 13:34:02 +03:00

</details>
@pachlava pachlava added type: bug A confirmed bug. type: crash The worst kind of bug. feature: coupons Related to coupons for a store. labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: coupons Related to coupons for a store. type: bug A confirmed bug. type: crash The worst kind of bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant