Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.41k stars 1.99k forks source link

Media: Discrepancy on images when searching in Calypso or wp-admin #15233

Open iamgabrielma opened 7 years ago

iamgabrielma commented 7 years ago

Issue reported on #3263438-t

Seems that searching terms on Calypso or in wp-admin returns a different number of images.

Steps to reproduce

  1. Starting at URL: https://wordpress.com/media/
  2. Search for a common term used for naming images on the Media Library ("cardamom" in this example)
  3. Performing the search via Calypso returns 9 images: https://cloudup.com/c_p7hjiRl8i
  4. Performing the search via wp-admin at https://my-example-domain.com/wp-admin/upload.php?search=cardamom returns 15 images: https://cloudup.com/cX6GoDuATZF

What I expected

When I search for a term in the search, to return the same number of images either in Calypso or in wp-admin

What happened instead

Using the same search term, returned 6 images less in Calypso (9) than in wp-admin (15)

rachelmcr commented 7 years ago

After some testing, I confirmed that the WP Admin Media Library search results include images with the search term in the image caption, while Calypso Media does not search on the image caption. This accounts for the discrepancy in search results on the site in the original report.

donalirl commented 6 years ago

Another case in 1089546-HC

Steps to reproduce

  1. Search wordpress.com/media for "Los Angeles" → nothing shows up
    1. Run the same search in WP Admin → brings up many results.

The term 'Los Angeles' is in the image title and image alt text fields. Caption field is empty.

iamgabrielma commented 6 years ago

Another one here: 1043005-hc, reported at p8yzl4-QO-p2

They search for “We now offer families” but the search hangs, there are no results:

https://wordpress.com/pages/sparkspanish.com?s=We+now+offer+families

Search works on Posts and on WP-Admin for Posts and Pages.

cc @brezocordero

rachelmcr commented 6 years ago

@iamgabrielma That sounds like a different issue, as this one is specific to the Media Library search. Could you open a new issue with steps to reproduce that page search issue on a test site?

rachelmcr commented 6 years ago

As noted in https://github.com/Automattic/wp-calypso/issues/20281, Calypso also does not search on the filename in the Media Library.

uncajobiwan commented 6 years ago

Believe this is the same issue. 1262322-zd-woothemes

Notes from user:

Environment:

  • latest version of Chrome on Win10
  • javascript enabled
  • ad-/scriptblocker (uBlock Origin) turned off for *.wordpress.com
  • all history cleared (including cookies and cache)

Expected behavior: Using the old UI I get all the search results I expect. For example:

  • hundreds of photos using the search term "2015"
  • 72 photos with the term "midsommar_odensvi" I can also use the function "only uploaded to this post" when choosing a featured image.

Problem behavior: Using the new UI at I only get :

  • 42 search result images using the term "2015"
  • 3 photos with the term "midsommar_odensvi" There is no possibility to choose "only uploaded to this post".

Verified user's results by logging into their account and duplicating searches. "2015" search results identical. "midsommar_odensvi" search results identical in Calypso. In wp-admin, they get 72 items, I get only 66

htdat commented 6 years ago

Another report 2623-gh-jpop-issues

From my test and observation:

stale[bot] commented 5 years ago

This issue has been marked as stale and will be closed in seven days. This happened because:

You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.

iamgabrielma commented 5 years ago

Re-opening this as is still an issue and comes up once in a while, last case on p9F6qB-47C-p2

stale[bot] commented 4 years ago

This issue has been marked as stale and will be closed in seven days. This happened because:

You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.

Robertght commented 4 years ago

I found another case in 3286827-zen

swoodipto commented 3 years ago

I found another case in 3286827-zen

This user came back at 24977626-HC

github-actions[bot] commented 3 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

synora commented 3 years ago

Reopening as I'm still able to replicate this.

github-actions[bot] commented 2 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

formosattic commented 2 years ago

Reposting some reports from https://github.com/Automattic/wp-calypso/issues/51699 :

Bug triage notes:

I was able to reproduce this on a test site with 48 media items, so the issue doesn't seem related to the number of media files.

Calypso just seems to return a smaller set of results.

Calypso - 22 items WP Admin - 44 items
image1 image2
github-actions[bot] commented 2 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.