Navigation Menu

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

Backend product search not working for products with an apostrophe on mobile devices #17564

Closed
5 of 7 tasks
BrandynF opened this issue Nov 4, 2017 · 5 comments
Closed
5 of 7 tasks
Labels
status: won't fix The issue won’t be fixed. type: bug The issue is a confirmed bug.

Comments

@BrandynF
Copy link

BrandynF commented Nov 4, 2017

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate
  • The issue still exists against the latest master branch of WooCommerce on Github (this is not the same version as on WordPress.org!)
  • I have attempted to find the simplest possible steps to reproduce the issue
  • I have included a failing test as a pull request (Optional)

Steps to reproduce the issue

  1. Create a product with an apostrophe in the title. Example: Howdy Y'all Sticker
  2. While using a mobile device, search for the product in the backend using the word with the apostrophe. Example: y'all

It appears that when searching for products in the backend while on mobile, the search query url writes apostrophes as ' while on desktop it writes apostrophes in the url as %27

Expected/actual behavior

When I follow those steps, I see the message "No products found"

I was expecting to see the product "Howdy Y'all Sticker"

Please note the search query url's when testing on mobile devices vs. desktop. It appears that on mobile devices when searching for products with an apostrophe, the apostrophe gets written in the url as ' while searching for products with an apostrophe on desktop it gets written as %27 as it should.

Isolating the problem

  • This bug happens with only WooCommerce plugin active
  • This bug happens with a default WordPress theme active, or Storefront
  • I can reproduce this bug consistently using the steps above

WordPress Environment

``` This issue occurs on multiple different servers and environment setups running WP 4.8.3 and WC 3.2.0 (and the current dev version) ```
@mikejolley
Copy link
Member

@BrandynF Well spotted. I confirm this happens. This also happens for POSTS however, so it looks to be a WordPress core issue and not something specific to WooCommerce.

This should be logged on Trac since it affects all custom post types. I had a search and found nothing existing:

https://core.trac.wordpress.org/search?q=quote+search+mobile

@mikejolley
Copy link
Member

@mikejolley mikejolley added status: won't fix The issue won’t be fixed. type: bug The issue is a confirmed bug. labels Nov 6, 2017
@BrandynF
Copy link
Author

@mikejolley after looking into it further it doesn't seem to be for all post types, though. It seems to only happen with WooCommerce products.

For example, when creating a post with the same title "Howdy Y'all Sticker" and then searching for it using the standard WordPress search (front end or backend on mobile), it seems to find the post just fine.

Only when creating "Howdy Y'all Sticker" as a product and then trying to search (front end or backend on mobile), it doesn't find the product and says there are no products.

I've tried this on multiple separate installs of WP and WC and I get the same results each time.

@mikejolley
Copy link
Member

It happens for regular posts or I wouldn't have logged it on trac.

@BrandynF
Copy link
Author

@mikejolley I apologize and overstepped. You're right. I was not following your steps on trac fully to replicate the issue and made the mistake.

Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: won't fix The issue won’t be fixed. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants