Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

[GlobalStep - WooCommerce 4.6 Beta 1] On frontend, user is able to search with empty input for product search block. #3223

Closed
1 of 3 tasks
gglobalstep opened this issue Sep 30, 2020 · 1 comment
Labels
block: product search Issues related to the Product Search block. type: enhancement The issue is a request for an enhancement.

Comments

@gglobalstep
Copy link

gglobalstep commented Sep 30, 2020

Bug Description:

On frontend, user is able to search with empty input for product search block.

Environment:

Windows 10, Mac Mojave:10.14.6 (18G103)
Browser: Chrome(Version 85.0.4183.83 (64-bit))
Firefox(Version 80.0.1)(64-bit)
Safari(Version 13.1.1)

Steps To Reproduce:

  1. Launch any of the site from existing 5 test sites.
  2. Sign In with valid credentials.
  3. Go to Pages->Add New.
  4. Add "All Product" block.
  5. Add "Product Search" block.
  6. Click on preview option.
  7. Now click on search button without providing any input in search field.
  8. Observe that user is able to serach with empty input.

Actual Result:

On frontend, user is able to search with empty input for product search block.

Expected Result:

Validation message "Enter product to search" or message should notify "No results found for the search criteria entered".

Artifacts:

#3223.zip

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

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.
``` ` ### WordPress Environment ###

WordPress address (URL): http://wpe.testwc.com
Site address (URL): http://wpe.testwc.com
WC Version: 4.6.0
REST API Version: ✔ 4.6.0
WC Blocks Version: ✔ 3.4.0
Action Scheduler Version: ✔ 3.1.6
WC Admin Version: ✔ 1.6.0-beta.1
Log Directory Writable: ✔
WP Version: ❌ 5.5 - There is a newer version of WordPress available (5.5.1)
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –

Server Environment

Server Info: Apache
PHP Version: 7.3.22-1+ubuntu18.04.1+deb.sury.org+1
PHP Post Max Size: 100 MB
PHP Time Limit: 3600
PHP Max Input Vars: 10000
cURL Version: 7.58.0
OpenSSL/1.1.1g

SUHOSIN Installed: –
MySQL Version: 5.7.29-32-log
Max Upload Size: 50 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 4.6.0
WC Database Prefix: wp_
Total Database Size: 6.20MB
Database Data Size: 4.62MB
Database Index Size: 1.58MB
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.05MB + 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.08MB + Index: 0.11MB + 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.06MB + 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_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 3.06MB + Index: 0.09MB + Engine InnoDB
wp_postmeta: Data: 0.25MB + Index: 0.17MB + Engine InnoDB
wp_posts: Data: 0.11MB + 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.02MB + 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_meta_lookup: Data: 0.02MB + Index: 0.09MB + 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_wpml_mails: Data: 0.23MB + Index: 0.00MB + Engine InnoDB

Post Type Counts

attachment: 31
custom_css: 2
nav_menu_item: 8
page: 37
post: 5
product: 16
product_variation: 4
shop_coupon: 3
shop_order: 14
shop_order_refund: 2
shop_subscription: 3
wp_block: 1
wpcf7_contact_form: 2

Security

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

Active Plugins (16)

Query Monitor: by John Blackbourn – 3.6.4
Contact Form 7: by Takayuki Miyoshi – 5.2.2
Debug Bar: by wordpressdotorg – 1.0.1
Facebook for WooCommerce: by Facebook – 2.0.1 – Installed version not tested with active version of WooCommerce 4.6.0
Jetpack by WordPress.com: by Automattic – 8.9.1
Google Ads for WooCommerce: by Kliken – 1.0.4 – Installed version not tested with active version of WooCommerce 4.6.0
Mailchimp for WooCommerce: by Mailchimp – 2.4.6 – Installed version not tested with active version of WooCommerce 4.6.0
Password Protected: by Ben Huson – 2.3
WooCommerce Beta Tester: by WooCommerce – 2.0.1 – Installed version not tested with active version of WooCommerce 4.6.0
WooCommerce Stripe Gateway: by WooCommerce – 4.5.2 – Installed version not tested with active version of WooCommerce 4.6.0
WooCommerce Product Add-ons: by WooCommerce – 3.0.38 (update to version 3.1.0 is available) – Installed version not tested with active version of WooCommerce 4.6.0
WooCommerce Services: by Automattic – 1.24.3 – Installed version not tested with active version of WooCommerce 4.6.0
WooCommerce Subscriptions: by WooCommerce – 3.0.7 (update to version 3.0.9 is available) – Installed version not tested with active version of WooCommerce 4.6.0
WooCommerce: by Automattic – 4.6.0-beta.1
WordPress Beta Tester: by Peter Westwood
Andy Fragen – 2.2.13

WP Mail Logging: by MailPoet – 1.9.7

Inactive Plugins (1)

Akismet Anti-Spam: by Automattic – 4.1.6

Dropin Plugins (1)

advanced-cache.php: advanced-cache.php

Must Use Plugins (4)

Force Strong Passwords - WPE Edition: by Jason Cosper – 1.6.4
WP Engine Seamless Login Plugin: by WP Engine – 1.5.5
WP Engine Security Auditor: by wpengine – 1.0.9
WP Engine System: by WP Engine – 4.0.0

Settings

API Enabled: –
Force SSL: –
Currency: GBP (£)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
subscription (subscription)
variable (variable)
variable subscription (variable-subscription)

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 - /?page_id=8
Cart: #9 - /?page_id=9
Checkout: #10 - /?page_id=10
My account: #11 - /?page_id=11
Terms and conditions: ❌ Page not set

Theme

Name: Storefront
Version: 2.7.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: –

Subscriptions

WCS_DEBUG: ✔ No
Subscriptions Mode: ✔ Live
Subscriptions Live URL: http://wpe.testwc.com
Subscription Statuses: wc-on-hold: 3
WooCommerce Account Connected: ✔ Yes
Active Product Key: ❌ No
Report Cache Enabled: ✔ Yes
Cache Update Failures: ✔ 0 failure

Store Setup

Country / State: United Kingdom (UK)

Subscriptions by Payment Gateway

Stripe: wc-on-hold: 3

Payment Gateway Support

Direct bank transfer: products
Cash on delivery: products
PayPal Standard: subscription_payment_method_change_customer
subscription_payment_method_change_admin
subscription_amount_changes
subscription_date_changes
multiple_subscriptions
subscription_payment_method_delayed_change
subscriptions
subscription_cancellation
subscription_suspension
subscription_reactivation
products
refunds

PayPal Reference Transactions Enabled: ✔ Yes
Stripe: products
refunds
tokenization
add_payment_method
subscriptions
subscription_cancellation
subscription_suspension
subscription_reactivation
subscription_amount_changes
subscription_date_changes
subscription_payment_method_change
subscription_payment_method_change_customer
subscription_payment_method_change_admin
multiple_subscriptions
pre-orders

Action Scheduler

Complete: 162
Oldest: 2020-09-01 21:20:29 +0000
Newest: 2020-09-30 15:47:53 +0000

Pending: 1
Oldest: 2020-09-30 16:47:53 +0000
Newest: 2020-09-30 16:47:53 +0000

`

</details>
@gglobalstep gglobalstep added the type: bug The issue/PR concerns a confirmed bug. label Sep 30, 2020
@nerrad
Copy link
Contributor

nerrad commented Sep 30, 2020

Thanks for the report.

I'm going to close this though because I don't think disagree with the assessment this is unexpected behaviour. If a search term isn't entered, I would expect the results page to load with all the products. It's easy enough for the shopper to recover if they did that by mistake.

Either way this is very low priority and not something we'd tackle in the short - medium term.

@nerrad nerrad closed this as completed Sep 30, 2020
@nerrad nerrad added block: product search Issues related to the Product Search block. type: enhancement The issue is a request for an enhancement. and removed type: bug The issue/PR concerns a confirmed bug. labels Sep 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: product search Issues related to the Product Search block. type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

2 participants