Automattic / wp-calypso

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

Media: "Restore Original" Button Not Working (Atomic) #32469

Open kriskorn opened 5 years ago

kriskorn commented 5 years ago

Steps to reproduce

  1. Starting at URL: https://wordpress.com/media/
  2. Click on an image and click "Edit" at the top
  3. Do some cropping or other changes and click "Done"
  4. Go back to media, click on the image and "Edit"
  5. Click on "Restore Original"

What I expected

That the modified image will be replaced with the original image.

What happened instead

A circular loading icon keeps loading. There are no errors in the browser console, but no original image is showing up either.

Browser / OS version

Tested on Google Chrome ( Version 73.0.3683.103 (Official Build) (64-bit) ) and Windows 10 Pro.

user-report #12257083-hc

lancewillett commented 5 years ago

Hi @kriskorn — what type of site, can you share the URL? Did you try a different browser, or a different website to see if it's consistent or just the one case?

I tested on a Simple site lancetester2018.wordpress.com and was able to use the restore image function as expected.

I'll close for now; but please re-open if you can reproduce on other sites so we can look for a pattern.

samiff commented 4 years ago

I was able to reproduce the issue on a WPcom on Atomic site. The "Restore Original" button worked as expected on a WPcom simple site.

Steps:

  1. On an AT site, upload an image to Site > Media
  2. Edit and crop the image, the click Done.
  3. Refresh the page to observe the edited image.
  4. Click to Edit the image again, this time trying the "Restore Original" button.

Result:

Spinning loader shows and the image is not restored.

The "Restore Original" button kicks off a POST request to https://public-api.wordpress.com/rest/v1.1/sites/__SITE_ID__/media/__POST_ID__/edit?http_envelope=1 which is returning:

{"code":400,"headers":[{"name":"Content-Type","value":"application\/json"}],"body":{"error":"server_error","message":"The Jetpack site is inaccessible or returned an error: transport error - HTTP status code was not 200 (500) [-32300]"}}
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.

JoshuaGoode commented 3 years ago

Confirming this is still present. Reproduced following steps shared

Still getting the response previously mentioned.

{"code":400,"headers":[{"name":"Content-Type","value":"application\/json"}],"body":{"error":"server_error","message":"The Jetpack site is inaccessible or returned an error: transport error - HTTP status code was not 200 (500) [-32300]"}}

Received the following error in Calypso.

image

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.