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

Uploading new image to Image block causes image to be inserted twice #3889

Closed
maddisondesigns opened this issue Dec 9, 2017 · 8 comments
Closed
Labels
[Status] Needs More Info Follow-up required in order to be actionable.

Comments

@maddisondesigns
Copy link

Issue Overview

After adding a new image block, I clicked Insert from Media Library and then uploaded a new image. After clicking Select in the popup window to insert the image into the block, the image then appeared twice in my page. It appeared below the existing Paragraph block, where I actually inserted the image block and it also appeared above the Paragraph block.

gutenberg-insertimage

Steps to Reproduce (for bugs)

  1. Add new image block (I inserted mine below a paragraph block)
  2. Click Insert from Media Library and drag 'n drop a new image into the popup window to upload it
  3. Select the image and click Select to insert it into the block

Expected Behavior

I would expect the image to only be inserted in the location where I added my Image block. It should only be inserted once, not multiple times.

Current Behavior

Adds multiple images into the page, in various locations

Firefox Quantum 57.0.1 (64-bit)
Gutenberg 1.8.1

@Lewiscowles1986
Copy link
Contributor

I Just tried this and although it seems to have a problem with me using my SVG upload plugin, I still only get a single image.

Tested on Firefox for Ubuntu
image

screenshot-single-image-upload-gutenberg

@danielbachhuber danielbachhuber added the [Status] Needs More Info Follow-up required in order to be actionable. label Jan 19, 2018
@danielbachhuber
Copy link
Member

Hi @maddisondesigns,

Does this issue still reproduce for you? If so, can you try deactivating all of your plugins and then activating them one by one to see if it's a plugin causing the problem?

@Lewiscowles1986
Copy link
Contributor

Lewiscowles1986 commented Jan 19, 2018

Hi @danielbachhuber it does not in Chrome, sorry for not sticking with it. Okay to close

@danielbachhuber
Copy link
Member

👌 Thanks for letting us know!

@maddisondesigns
Copy link
Author

maddisondesigns commented Jan 20, 2018

@danielbachhuber I just tried this again multiple times and the same thing occured at least once. The only plugins that I had activated were Gutenberg, ACF Pro and WooCommerce.

I then tried after deactivating ACF Pro and WooCommerce and wasn't able to replicate. Also tried after just reactivating ACF Pro and WooCommerce individually, and wasn't able to replicate. This seems to be a very random issue, but an issue all the same. I'll leave it up to you as to whether you want to reopen this, but there's obviously an issue there. Regardless of whether there were plugins activated at the time or not, this sort of thing shouldn't be happening. It's up to Gutenberg to work with all/majority of existing major plugins. This issue doesn't occur in WordPress right now, so Gutenberg needs to ensure that it doesn't cause this to occur in the future.

Also, in future, if you specifically ask the person who raised the issue a question, can you please not close the issue based on someone elses answer. I've never used the SVG upload plugin that @Lewiscowles1986 mentioned, so my initial issue obviously didn't have anything to do with that plugin. Thanks

@Lewiscowles1986
Copy link
Contributor

My bad, I thought it was my issue and suggested closing because I didn't want any more emails 😟

@danielbachhuber
Copy link
Member

I then tried after deactivating ACF Pro and WooCommerce and wasn't able to replicate. Also tried after just reactivating ACF Pro and WooCommerce individually, and wasn't able to replicate. This seems to be a very random issue, but an issue all the same. I'll leave it up to you as to whether you want to reopen this, but there's obviously an issue there.

If you can provide exact reproduction steps, happy to look at it further. Without reproduction steps, it's much more difficult to track down the issue.

Regardless of whether there were plugins activated at the time or not, this sort of thing shouldn't be happening.

I agree.

It's up to Gutenberg to work with all/majority of existing major plugins.

This is a pretty strong statement. Gutenberg will try its best to work with existing plugins (see some work I'm doing in #4072), but it'd be impossible for us to guarantee.

Also, in future, if you specifically ask the person who raised the issue a question, can you please not close the issue based on someone elses answer.

Yep, no problem. This was my fault.

@maddisondesigns
Copy link
Author

@danielbachhuber The exact reproduction steps are outlined in the original issue. It didn't take much to cause this issue. All I tried to do was insert an image.

  • Add new image block (I inserted mine below a paragraph block)
  • Click Insert from Media Library and drag 'n drop a new image into the popup window to upload it
  • Select the image and click Select to insert it into the block

Like a lot of Gutenberg issues, it doesn't happen all the time because Gutenberg is so unstable and inconsistent. I fully understand how hard trying to debug inconsistent issues like this are, but they can't be ignored. I dread to think how frustrated the average user is going to feel when they experience inconsistencies like this.

It's understandable that certain plugins wont work, or may need to be updated by the developer (eg. plugins specifically related to TinyMCE), but Gutenberg needs to work with the majority of plugins and more specifically, major plugins like ACF, Yoast, WooCommerce etc... It's not good enough to say that there's no guarantee that they will work. Considering Gutenberg still doesn't even work properly, and there's little to no documentation for developers, how can you expect developers to update their plugins before it's even released? And they shouldn't have to. By not supporting the majority of plugins and at the very least, major plugins that I mentioned above, you are going to cause hundreds of thousands of sites to break once this gets released. This is one of the main reasons why the majority of developers want to see this get released as a (working) plugin first, rather than just getting forced into core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs More Info Follow-up required in order to be actionable.
Projects
None yet
Development

No branches or pull requests

3 participants