woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.29k stars 10.73k forks source link

Product attributes drag and drop broken in New Product Management Experience #35901

Closed nathanss closed 1 year ago

nathanss commented 1 year ago

Prerequisites

Describe the bug

When adding attributes for a product in New Product Management Experience, with 2 or more attributes, reordering them with drag and drop is not working as expected.

Before drag and drop:

image

After drag and drop:

image

Expected behavior

The order should be correctly changed with drag and drop

Actual behavior

The dragged attribute seems to overwrite the other attribute. After that, it all seems to go "off rails", all sorts of weird things happen if you try to delete one of the attributes, or save.

Steps to reproduce

  1. Create a new product
  2. Go to the Attributes section
  3. Add two attributes with some values
  4. Drag the second attribute to make it the first
  5. Issue will happen

WordPress Environment

`

WordPress Environment

WordPress address (URL): http://segundosite.local Site address (URL): http://segundosite.local WC Version: 7.3.0 REST API Version: ✔ 7.3.0 WC Blocks Version: ✔ 8.9.2 Action Scheduler Version: ✔ 3.5.2 Log Directory Writable: ✔ WP Version: 6.1.1 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: en_US External object cache: –

Server Environment

Server Info: nginx/1.16.0 PHP Version: 8.1.9 PHP Post Max Size: 1,000 MB PHP Time Limit: 1200 PHP Max Input Vars: 4000 cURL Version: 7.84.0 (SecureTransport) OpenSSL/1.1.1q

SUHOSIN Installed: – MySQL Version: 8.0.16 Max Upload Size: 300 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔

Database

WC Database Version: 7.3.0 WC Database Prefix: wp_ Total Database Size: 11.17MB Database Data Size: 8.06MB Database Index Size: 3.11MB wp_woocommerce_sessions: Data: 0.02MB + 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.31MB + Index: 0.25MB + 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.17MB + Index: 0.16MB + Engine InnoDB wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_comments: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB wp_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_gla_shipping_rates: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_automation_run_logs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_automation_runs: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_automation_triggers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_automation_versions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_automations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_custom_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_dynamic_segment_filters: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_feature_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_forms: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_links: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_newsletter_option: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_option_fields: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_segment: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_newsletter_templates: Data: 2.52MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_scheduled_task_subscribers: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_scheduled_tasks: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_segments: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_sending_queues: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_settings: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_bounces: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wp_mailpoet_statistics_clicks: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_forms: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_statistics_newsletters: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_statistics_opens: Data: 0.02MB + Index: 0.08MB + Engine InnoDB wp_mailpoet_statistics_unsubscribes: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wp_mailpoet_statistics_woocommerce_purchases: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wp_mailpoet_stats_notifications: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_subscriber_custom_field: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_ips: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_subscriber_segment: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_subscriber_tag: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailpoet_subscribers: Data: 0.02MB + Index: 0.13MB + Engine InnoDB wp_mailpoet_tags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_user_agents: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_mailpoet_user_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_options: Data: 3.03MB + Index: 0.06MB + Engine InnoDB wp_postmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wp_posts: Data: 0.06MB + Index: 0.06MB + 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_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_terms: 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_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + 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_bundle_lookup: Data: 0.02MB + Index: 0.09MB + 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.02MB + 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 wp_woocommerce_bundled_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_woocommerce_bundled_items: Data: 0.02MB + Index: 0.03MB + Engine InnoDB

Post Type Counts

attachment: 2 mailpoet_page: 1 page: 7 post: 6 product: 75 product_variation: 1 revision: 3 wp_global_styles: 1

Security

Secure connection (HTTPS): ❌ Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ✔

Active Plugins (9)

Classic Editor: by WordPress Contributors – 1.6.2 Facebook for WooCommerce: by Facebook – 3.0.4 Google Listings and Ads: by WooCommerce – 2.2.1 Jetpack: by Automattic – 11.5.1 MailPoet: by MailPoet – 4.0.0 TikTok: by TikTok – 1.0.11 WooCommerce Beta Tester: by WooCommerce – 2.1.0 WooCommerce One Page Checkout: by Automattic – 1.9.8 WooCommerce: by Automattic – 7.3.0-dev

Inactive Plugins (1)

WooCommerce Product Bundles: by WooCommerce – 6.17.3

Settings

API Enabled: – Force SSL: – Currency: BRL (R$) Currency Position: left_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: bundle (bundle) 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: – Enforce Approved Product Download Directories: ✔ Order datastore: WC_Order_Data_Store_CPT

WC Pages

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

Theme

Name: Storefront Version: 4.2.0 Author URL: https://woocommerce.com/ Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme WooCommerce Support: ✔

Templates

Overrides: –

Admin

Enabled Features: activity-panels analytics coupons customer-effort-score-tracks experimental-products-task experimental-import-products-task experimental-fashion-sample-products shipping-smart-defaults shipping-setting-tour homescreen marketing multichannel-marketing mobile-app-banner navigation new-product-management-experience onboarding onboarding-tasks remote-inbox-notifications remote-free-extensions payment-gateway-suggestions settings shipping-label-banner subscriptions store-alerts transient-notices woo-mobile-welcome wc-pay-promotion wc-pay-welcome-page

Disabled Features: minified-js Daily Cron: ✔ Next scheduled: 2022-12-09 15:04:08 +00:00 Options: ✔ Notes: 50 Onboarding: completed

Action Scheduler

Complete: 789 Oldest: 2022-11-21 15:05:07 +0000 Newest: 2022-12-08 16:19:32 +0000

Failed: 1 Oldest: 2022-11-21 17:03:56 +0000 Newest: 2022-11-21 17:03:56 +0000

Pending: 3 Oldest: 2022-12-08 16:21:16 +0000 Newest: 2022-12-08 18:13:14 +0000

Status report information

Generated at: 2022-12-08 16:20:37 +00:00 `

Isolating the problem

github-actions[bot] commented 1 year ago

We are adding the status: needs reproduction label to this issue to try reproduce it on the current released version of WooCommerce.

Thank you for your patience.

swatipawarGS commented 1 year ago

Hi @nathanss,

Thank you for taking the time to report this bug, we really appreciate your help. We are able to reproduce the issue on our end using the WooCommerce 7.1.1 version and WordPress 6.1.1 version.

Please find below the screencast for reference :

https://user-images.githubusercontent.com/94531721/206988711-09f30335-ce78-46a0-9a14-2dd27d7b62d6.mp4

Priority of this issue will be assigned shortly after we’d go through a round of prioritization. Please note it may take a couple of days.

nathanss commented 1 year ago

I tried reproducing it at trunk and the issue is not happening anymore. Since there's a lot of work happening at attributes, someone must have fixed this already.