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

Image upload preview is not correct with block editor #1853

Closed
zandyring opened this issue Feb 4, 2020 · 6 comments · Fixed by #1895
Closed

Image upload preview is not correct with block editor #1853

zandyring opened this issue Feb 4, 2020 · 6 comments · Fixed by #1895
Labels
[Type] Bug Something isn't working

Comments

@zandyring
Copy link

zandyring commented Feb 4, 2020

Describe the bug
When an image is uploading, the preview (greyed out) shown is not the image that's uploading. It's showing me photos in the preview from 2012.

It doesn't happen in Aztec, just in the block editor.

Further, when I backed out of a draft during an upload (where the preview was wrong), then returned to the draft, the preview image (wrong) had actually uploaded into the post, not the photo I had chosen (I've only been able to do this once, and haven't been able to reproduce it).

To Reproduce
Steps to reproduce the behavior:

  1. Create a new post with the block editor enabled
  2. Tap through the steps to add a new image to the post (I "chose from device")
  3. As it uploads, the preview changes from the grey mountain icon to the wrong preview
  4. Once it is uploaded, the image is correct.

Expected behavior
I would expect the preview to match the image selected

Screenshots
This collage is reversed -- the image on the right side is the uploaded preview (from 2012), the image on the left is the actual selected image (from yesterday):
Screen Shot 2020-02-04 at 10 31 53 AM

In the next collage, this is the image where I selected a picture of a matcha latte, but the preview showed baby baptism again (2012), and I exited the draft and changed my settings (to turn off the block editor on new posts). Then I returned to the draft, and the 2012 image had uploaded somehow (I can't reproduce this).
Screen Shot 2020-02-04 at 10 33 50 AM

Smartphone (please complete the following information):

  • Device: Pixel 3XL
  • OS: Android 10
  • App Version: alpha-207

Additional context
Add any other context about the problem here.

@hypest hypest added the [Type] Bug Something isn't working label Feb 4, 2020
@mchowning
Copy link
Contributor

👋 @zandyring !

Thanks so much for reporting this and filing such a thorough issue! 🙇

For some reason I'm having some trouble recreating the issue, so I wanted to see if you could answer a few follow-up questions I had (and don't feel like you need to investigate further if you don't know the answer to some of these already 😃):

  • How consistently does the issue occur for you? Every time you add a new photo from your device?
  • Would you mind sharing what site(s) you were using when you saw this issue?
  • How many photos do you have in your media library (just looking for a very rough guess, 10s, 100s, 1000s, etc.)
  • It sounds like the "wrong" images that are showing during the upload are related ("It's showing me photos in the preview from 2012")...
    • Am I understanding correctly that the "wrong" images were all uploaded around the same time ("from 2012")?
    • Were the "wrong" photos among the earlier photos you ever added to your media library by chance?

@zandyring
Copy link
Author

  • How consistently does the issue occur for you? Every time you add a new photo from your device?
    Yes, every time I use a photo "from device" AND am using the block editor. I was messing around getting screenshots for this for about 20 minutes, and created/deleted multiple drafts, and it happened each time in that scenario.

  • Would you mind sharing what site(s) you were using when you saw this issue?
    zandy.blog (my personal site)

  • How many photos do you have in your media library (just looking for a very rough guess, 10s, 100s, 1000s, etc.)
    8.8 gb worth (of 38 gb limit) -- I'd guess 1000s :)

  • It sounds like the "wrong" images that are showing during the upload are related ("It's showing me photos in the preview from 2012")...
    I'm not sure they are related. They're from the same blog, but the posts now have nothing to do (content-wise) with those images.

  • Am I understanding correctly that the "wrong" images were all uploaded around the same time ("from 2012")?
    Yes, they're all from July 2012 (from this specific post: https://zandy.blog/2012/07/10/twins-baptism/). I'm not sure if once the preview has gone through all the photos in that post if they'll move on to the next images (Aug 2012) or not.

  • Were the "wrong" photos among the earlier photos you ever added to your media library by chance?
    Yes, they're all in my media library!

@cameronvoell
Copy link
Contributor

cameronvoell commented Feb 5, 2020

Incorrect Placeholder Correct Image showing
Screenshot_20200204-154846_WordPress Screenshot_20200204-154858_WordPress

Samsung S10, Android 10, WordPress Android 134.1-rc-2

I was able to recreate this behavior in the app, but the exact steps for doing so are still eluding me.

On my WordPress.com account I was able to see the app in a state where even when I closed the app and reopened, started a new article, and added an image, the image placeholder during upload would show the wrong image. This continued through multiple app restarts (I would go to the app switching screen on android and swipe to close the app, I did not clear cache etc.). I would create a new article, add an image block, add an image from device, and see the incorrect placeholder each time. Different images uploaded from my device were showing me different images from my WordPress media library as the background during upload.

Eventually this fixed itself. One action I took before it showed as fixed, was that I visited the WordPress Media section of the Android app, and pulled to refresh and scrolled. I'm not sure whether that is what fixed it but it is the only notable action I took that I can think of. Since then, when I upload an image from the device to the image block, I see the correct placeholder during upload. I can't seem to get the app back in a "WordPress media library images showing as placeholders during upload for images uploaded from device" state.

What did I do to get the app in that broken state in the first place? Without being able to re-create the issue on my own, I'm hesitant to describe too much what I tried since it could lead in the wrong direction. But mainly I was adding gallery blocks with many images from the media library(20+), and then adding an image block and uploading from the device. My account has about 60 images in the media library, and many more images on the device, with some overlap between images on my device and in the WordPress Media library.

If I'm able to get the app in a bad state again, or if I come up with reproducible steps, I'll return with more info.

@koke
Copy link
Member

koke commented Feb 5, 2020

I can't test right now, but I remember that the temporary upload IDs were incremental, so there's a chance those might be conflicting with actual IDs on the site

@hypest
Copy link
Contributor

hypest commented Feb 5, 2020

FWIW, I did replicate the issue once, but having trouble replicating it again.

@mkevins
Copy link
Contributor

mkevins commented Feb 6, 2020

I can't test right now, but I remember that the temporary upload IDs were incremental, so there's a chance those might be conflicting with actual IDs on the site

This has been confirmed to indeed be at least part of the problem. I've listed @mchowning 's steps on this issue that successfully reproduce this case: wordpress-mobile/WordPress-Android#11239 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants