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 a Featured image uploads it twice #3392

Closed
Ipstenu opened this issue Nov 8, 2017 · 15 comments · Fixed by #5432
Closed

Uploading a Featured image uploads it twice #3392

Ipstenu opened this issue Nov 8, 2017 · 15 comments · Fixed by #5432
Labels
[Feature] Media Anything that impacts the experience of managing media [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended

Comments

@Ipstenu
Copy link
Contributor

Ipstenu commented Nov 8, 2017

Issue Overview

When you add a featured image via Gutenberg, it uploads twice, leaving you with one attached to the post and one not in the media library.

Steps to Reproduce (for bugs)

  1. Make a new post
  2. Add featured image
  3. Save the post
  4. Look in the media library and see the image TWICE

Tested on Safari on a Mac

Expected Behavior

The image should only upload once.

Current Behavior

It uploads twice.

@jughoor
Copy link

jughoor commented Nov 9, 2017

Incase if your using Volley api adding this retry method worked for me.
stringRequest.setRetryPolicy(new DefaultRetryPolicy(DefaultRetryPolicy.DEFAULT_TIMEOUT_MS * 2, 1, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));

this problem occur due to the api retry mechanism.

@mtias mtias added [Feature] Media Anything that impacts the experience of managing media [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended labels Nov 20, 2017
@jorgefilipecosta
Copy link
Member

Hi @Ipstenu, I'm not being able to reproduce this problem, could you please let me know if the problem is still happening?

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Nov 22, 2017

No, but now I'm getting function (){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||F();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)} when I try to upload, which I'm tracking down. This is likely a conflict with 'something' but it's happening on my Multisite all the time, even with all plugins disabled.

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Nov 22, 2017

This seems to happen on SOME themes and the only correlation I can find is that if your theme inserts new meta boxes.

The problem is I can't reproduce this because every time I activate a theme with a meta box, the featured image upload breaks with the above error ...

And it does this:

screen shot 2017-11-22 at 11 14 31 am

I grabbed Yoast to test, but all you have to do is grab a theme like Genesis and boom, Gutenberg's blowing up again :(

tl;dr: I can't test it because something broke metaboxes, which breaks featured image uploads...

@youknowriad
Copy link
Contributor

I tried with Yoast and it's working as expected, I can't reproduce. Can you point me towards a free theme breaking Gutenberg to test? Or maybe this is fixed right now?

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Dec 29, 2017

This still happens on StudioPress' Genesis themes. (the admin bar thing is working again though!)

@youknowriad
Copy link
Contributor

Can we get a free copy of these themes to debug? Can we reproduce with a free theme?

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Dec 30, 2017

I've opened a support ticket with StudioPress to ask them about that (and linked here)

@youknowriad
Copy link
Contributor

Thanks @Ipstenu for the theme but I still can't reproduce either of these two featured image bugs

kapture 2018-01-05 at 11 56 28

It might be something else, a plugin you have or something?

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Jan 7, 2018

That's wild... Have you tried it on an existing post? That is write some post stuff first, THEN add the image?

The only thing I can think that's 'different' is that and that I use Multiste, but I repro-d it on a clean single site.

@youknowriad
Copy link
Contributor

@Ipstenu Same on an existing post. Are you using the "master" version of Gutenberg or the last released one? There might be some fixes not released yet (I recall a multisite fix)

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Jan 8, 2018

No, I'm using the latest released plugin version.

@youknowriad
Copy link
Contributor

Ok, we will release soon and you can test to check if it's still a bug after that.

@Ipstenu
Copy link
Contributor Author

Ipstenu commented Jan 28, 2018

screen shot 2018-01-27 at 27 jan - 7 54 02 pm

Now it does it THREE times and one was a renamed image 🤯

@gziolo
Copy link
Member

gziolo commented Mar 9, 2018

It should be fixed with #5432. Can you confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Media Anything that impacts the experience of managing media [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants