woocommerce / woocommerce-admin

(Deprecated) This plugin has been merged to woocommerce/woocommerce
https://woocommerce.github.io/woocommerce-admin/#/
Other
360 stars 145 forks source link

WooCommerce → Customers page requires two searches for customer data to load. #6820

Closed phillipcornwell closed 3 years ago

phillipcornwell commented 3 years ago

Issue

When searching for a customer in "WooCommerce → Customers" it is necessary to search for a customer twice before they show up in the search results. They have a DB mismatch too but we couldn't get that fixed. They are working with their host on that. My system shows the same behavior with WC 5.2.1

Prerequisites (mark completed items with an [x]):

Describe the bug When searching for a customer in the Customers section of the site it is necessary to search for a user twice before they show in the search results

Expected behavior The customer should show after the first search attempt.

Actual behavior It takes a second attempt at the search to get the proper result.

Steps to reproduce the bug (We need to be able to reproduce the bug in order to fix it.) Steps to reproduce the bug:

  1. Go to 'WooCommerce → Customers'
  2. Search for a customer and see empty results
  3. Search for the same user again to load the results correctly

Screenshots First search: https://www.dropbox.com/s/45sel4shz0b1q6q/Screen%20Shot%202021-04-15%20at%203.33.00%20PM.jpg?dl=0 Second search: https://www.dropbox.com/s/sbm1vt28hnca7m7/Screen%20Shot%202021-04-15%20at%203.33.41%20PM.jpg?dl=0

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

WordPress Environment We use the WooCommerce System Status Report to help us evaluate the issue. Without this report we won't be able to fully evaluate this issue.

``` ### WordPress Environment ### WordPress address (URL): https://wildmountainguides.co.uk Site address (URL): https://wildmountainguides.co.uk WC Version: 5.2.0 REST API Version: ✔ 5.2.0 WC Blocks Version: ✔ 4.7.2 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 2.2.1 Log Directory Writable: ✔ WP Version: ❌ 5.7 - There is a newer version of WordPress available (5.7.1) WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: en_GB External object cache: – ### Server Environment ### Server Info: LiteSpeed PHP Version: 7.2.34 PHP Post Max Size: 64 MB PHP Time Limit: 70 PHP Max Input Vars: 1000 cURL Version: 7.71.0 OpenSSL/1.1.1d SUHOSIN Installed: – MySQL Version: 5.7.33-cll-lve Max Upload Size: 64 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ❌ Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected. DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 4.3.3 WC Database Prefix: wp_ Total Database Size: 441.87MB Database Data Size: 349.49MB Database Index Size: 92.38MB wp_woocommerce_sessions: Data: 1.17MB + Index: 0.07MB + Engine MyISAM wp_woocommerce_api_keys: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_attribute_taxonomies: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_downloadable_product_permissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_items: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_order_itemmeta: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_tax_rates: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_woocommerce_tax_rate_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zones: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_locations: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_shipping_zone_methods: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokens: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_payment_tokenmeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_woocommerce_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM cerber_acl: Data: 0.00MB + Index: 0.00MB + Engine MyISAM cerber_blocks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM cerber_countries: Data: 0.00MB + Index: 0.00MB + Engine MyISAM cerber_lab: Data: 0.00MB + Index: 0.00MB + Engine MyISAM cerber_lab_ip: Data: 0.02MB + Index: 0.00MB + Engine InnoDB cerber_lab_net: Data: 0.02MB + Index: 0.02MB + Engine InnoDB cerber_log: Data: 0.04MB + Index: 0.02MB + Engine MyISAM cerber_qmem: Data: 0.00MB + Index: 0.00MB + Engine MyISAM cerber_traffic: Data: 0.10MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_actions: Data: 159.81MB + Index: 34.52MB + Engine MyISAM wp_actionscheduler_claims: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_actionscheduler_groups: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_actionscheduler_logs: Data: 74.65MB + Index: 55.45MB + Engine MyISAM wp_cerber_files: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_cerber_sets: Data: 0.14MB + Index: 0.00MB + Engine MyISAM wp_cerber_uss: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_commentmeta: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_comments: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_ewwwio_images: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_ewwwio_queue: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_e_submissions: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_e_submissions_actions_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_e_submissions_values: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_links: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_litespeed_crawler: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_litespeed_crawler_blacklist: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_mailchimp_carts: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_mailchimp_jobs: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_micro_revisions: Data: 0.04MB + Index: 0.00MB + Engine MyISAM wp_options: Data: 4.42MB + Index: 0.22MB + Engine MyISAM wp_postmeta: Data: 89.37MB + Index: 0.90MB + Engine MyISAM wp_posts: Data: 18.32MB + Index: 0.34MB + Engine MyISAM wp_rank_math_404_logs: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_rank_math_analytics_gsc: Data: 0.97MB + Index: 0.43MB + Engine MyISAM wp_rank_math_analytics_keyword_manager: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_analytics_objects: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_rank_math_internal_links: Data: 0.10MB + Index: 0.02MB + Engine MyISAM wp_rank_math_internal_meta: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp_rank_math_redirections: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_redirections_cache: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_rank_math_sc_analytics: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_sbi_instagram_feeds_posts: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_sbi_instagram_feed_locator: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wp_sbi_instagram_posts: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wp_termmeta: Data: 0.02MB + Index: 0.02MB + Engine MyISAM wp_terms: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_term_relationships: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_term_taxonomy: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_usermeta: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_users: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_admin_notes: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_wc_admin_note_actions: Data: 0.01MB + Index: 0.00MB + Engine MyISAM wp_wc_bookings_availability: Data: 0.01MB + Index: 0.01MB + Engine MyISAM wp_wc_bookings_availabilitymeta: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_booking_relationships: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_category_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_customer_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_deposits_payment_plans: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_deposits_payment_plans_schedule: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_download_log: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_coupon_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_order_product_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_order_stats: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_order_tax_lookup: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_product_meta_lookup: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_reserved_stock: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wc_tax_rate_classes: Data: 0.00MB + Index: 0.01MB + Engine MyISAM wp_wc_webhooks: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wdi_feeds: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_wdi_themes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wp_woocommerce_square_customers: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wptripadvisor_post_templates: Data: 0.00MB + Index: 0.00MB + Engine MyISAM wp_wptripadvisor_reviews: Data: 0.00MB + Index: 0.00MB + Engine MyISAM ### Post Type Counts ### attachment: 359 elementor_library: 31 global_product_addon: 1 nav_menu_item: 8 oembed_cache: 3 page: 26 popup: 1 popup_theme: 6 post: 14 product: 32 revision: 1318 seedprod: 3 shop_coupon: 4 shop_order: 8 sl-insta-account: 1 sl-insta-feed: 1 sl-insta-media: 551 themify_popup: 1 wc_booking: 24 woo_multii_layout: 2 wpcf7_contact_form: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (44) ### ManageWP - Worker: by GoDaddy – 4.9.8 Admin Page Spider Pro Pack: by J7 Digital – 4.41 Akismet Anti-Spam: by Automattic – 4.1.9 Cognito Forms: by Cognito Apps – 1.1.8 Coming Soon Page, Maintenance Mode & Landing Pages by SeedProd: by SeedProd – 6.2.1 Contact Form 7: by Takayuki Miyoshi – 5.4 Elementor Pro: by Elementor.com – 3.2.1 Elementor: by Elementor.com – 3.1.4 Envato Elements: by Envato – 2.0.8 Facebook for WooCommerce: by Facebook – 2.3.5 Google XML Sitemaps: by Auctollo – 4.1.1 Happy Elementor Addons: by weDevs – 2.23.0 Host Header Injection Fix: by Jeff Starr – 2.3 Smash Balloon Instagram Feed: by Smash Balloon – 2.9 Jetpack by WordPress.com: by Automattic – 9.6.1 Limit log in attempts reloaded: by Limit log in attempts reloaded – 2.21.0 LiteSpeed Cache: by LiteSpeed Technologies – 3.6.4 Mailchimp for WooCommerce: by Mailchimp – 2.5.1 Microthemer: by Themeover – 6.3.6.5 Oribi Analytics: by Oribi – 3.1 Product Slider For WooCommerce: by AccessPress Themes – 3.0.2 reSmush.it Image Optimizer: by reSmush.it – 0.3.11 Elementor Contact Form DB: by Sean Barton - Tortoise IT – 1.7 Rank Math SEO PRO: by Rank Math – 2.6.0 Rank Math SEO: by Rank Math – 1.0.62 Smoother: by Merkulove – 1.0.5 Sticky Header Effects for Elementor: by Rwattner – 1.4.3 UpdraftPlus - Backup/Restore: by UpdraftPlus.Com DavidAnderson – 1.16.53 Woo Product Multi Layout: by eDataStyle ( proscriptsell ) – 2.7 WooCommerce Admin: by WooCommerce – 2.2.1 WooCommerce Bookings: by WooCommerce – 1.15.38 WooCommerce Deposits: by WooCommerce – 1.5.6 Live Product Editor for WooCommerce: by 7VX LLC USA CA – 4.4.5 WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.1 WooCommerce Stripe Gateway: by WooCommerce – 5.1.0 WooCommerce Product Add-ons: by WooCommerce – 3.8.0 WooCommerce Shipping & Tax: by Automattic – 1.25.11 WooCommerce - ShipStation Integration: by WooCommerce – 4.1.41 WooCommerce Square: by WooCommerce – 2.4.1 WooCommerce: by Automattic – 5.2.1 WP Approve User: by Konstantin Obenland – 7 WP Cerber Security, Anti-spam & Malware Scan: by Cerber Tech Inc. – 8.8.5 WP Image Zoom: by SilkyPress – 1.46 WP TripAdvisor Review Slider: by LJ Apps – 7.7 ### Inactive Plugins (3) ### Happy Elementor Addons Pro: by weDevs – 1.8.0 Responsive Lightbox & Gallery: by dFactory – 2.3.2 Spotlight - Social Media Feeds: by RebelCode – 0.7 ### Must Use Plugins (2) ### installatron_hide_status_test.php: by – ManageWP - Worker Loader: by GoDaddy – ### Settings ### API Enabled: – Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: booking (booking) 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: ❌ Page visibility should be public Basket: woocommerce/woocommerce#17 - /basket/ Checkout: woocommerce/woocommerce#18 - /checkout/ My account: woocommerce/woocommerce#19 - /my-account/ Terms and conditions: ❌ Page not set ### Theme ### Name: Hello Elementor Version: 2.3.1 Author URL: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash 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: – ### Action Scheduler ### Canceled: 1 Oldest: 2021-04-15 01:20:03 +0100 Newest: 2021-04-15 01:20:03 +0100 Complete: 443,656 Oldest: 2021-01-23 13:10:03 +0000 Newest: 2021-04-15 20:11:39 +0100 Pending: 43 Oldest: 2021-04-15 20:12:15 +0100 Newest: 2021-04-18 17:15:07 +0100 ### Status report information ### Generated at: 2021-04-15 20:11:58 +01:00 ```
phillipcornwell commented 3 years ago

Reported in 17535522-hc

tammullen commented 3 years ago

Hi @phillipcornwell

Thank you for reporting the issue. WooCommerce / Customers functionality is a part of WooCommerce Admin which is being developed in another repository: https://github.com/woocommerce/woocommerce-admin.

I am going to move your bug report there so that the right team could take a look further.

joelclimbsthings commented 3 years ago

Confirmed that this bug is still present in the current main.

First search always comes up empty, with subsequent searches working correctly (until you refresh the page).

moon0326 commented 3 years ago

Hi @phillipcornwell @joelclimbsthings ✋

I'm trying to reproduce it in my local env, but I can't reproduce it exactly how it is described.

I see two XHR requests to the server and the screen blinks, but I did not have to hit the search button twice.

Could you please share how you reproduce it? or am I missing any steps?

Thank you!

Update 1: I've also tested it with guest customers.

Screen Capture on 2021-06-08 at 20-03-36

joelclimbsthings commented 3 years ago

Thanks for looking at this @moon0326 , and sorry for the delay! I'm still definitely able to reproduce this, or at the very least some finicky behavior around this.

If you simply plug the first name of a customer into the URL (like so: /wp-admin/admin.php?page=wc-admin&path=%2Fcustomers&search=Joe), and then do a page load, do the results come up for you then? I always get no results via that method.

Then, if I click the (x) button to clear the search, the search field doesn't seem to be clickable at all and I have to refresh or go to another screen and back to interact with it.

In summary:

I'm also able to reproduce the error more as described in the original report:

This is with the latest main branch, on both Chrome and Firefox.

Edit: No worries if you can't reproduce, I may have a chance to look at this this sprint.

thuautp commented 3 years ago

Also reported in https://wordpress.org/support/topic/buggy-experience-in-the-customers-section/. I can replicate this as well on my site.