gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Image upload in columns uploads image twice

Open websupporter opened this issue 5 years ago • 4 comments

Description

Uploaded an image through the media dialog to fill an image block in a column, the image gets uploaded twice. It populates the selected image block but also creates a new image block and populates this one as well.

Step-by-step reproduction instructions

  1. Clean installation
  2. Activate current Gutenberg plugin
  3. Create a columns block
  4. Insert an image block in one column
  5. Open the media dialog
  6. Upload an image
  7. Select
  8. See two images in the content
  9. Open media dialog again
  10. See image has been uploaded twice

Expected behaviour

The image gets uploaded once and only the selected image block gets filled with an image

Actual behaviour

When I upload the image, the image gets uploaded twice. Gutenberg populates the selected image block bot also creates a new image block and populates this block as well.

Sometimes, but I am not quite sure how to reproduce that, when uploading the media dialog gets white (only close-cross is left) and only the newly created block gets populated. i guess both are related.

Screenshots or screen recording (optional)

bug

WordPress information

  • WordPress version:5.6.1
  • Gutenberg version: 9.9.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? Yes

Device information

  • Device: Desktop
  • Operating system: Ubuntu 18.04
  • Browser: Firefox 84.0.2

websupporter avatar Feb 11 '21 06:02 websupporter

Thanks for reporting @websupporter ! I could reproduce this - probably has to do with the drop and drag.

ntsekouras avatar Feb 11 '21 09:02 ntsekouras

I can reproduce this too.

This issue also occurs when replacing a cover block image. Didn't want to open a new issue as it seems exactly the same, with a duplicate image uploaded and then added as a separate image block above the cover block.

Sandstromer avatar Feb 11 '21 11:02 Sandstromer

Thank you for the detailed rapport @websupporter David! This is a highly visible bug that we will need to get fixed and backported to WP 5.7.

We also have another rapport here: https://github.com/WordPress/gutenberg/issues/25805

It is also added to the WP 5.7 Project board. https://github.com/WordPress/gutenberg/projects/52#card-54284530

At the moment we are waiting for a developer to volunteer to work on a PR.

I will leave both issues open to create additional visibility.

paaljoachim avatar Feb 12 '21 16:02 paaljoachim

Closing as duplicate. The other issue already has Priority High and is in the 5.7 board.

noisysocks avatar Feb 24 '21 00:02 noisysocks