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 - Invalid JSON warning #16372

Closed
eliorivero opened this issue Jul 1, 2019 · 4 comments
Closed

Image Upload - Invalid JSON warning #16372

eliorivero opened this issue Jul 1, 2019 · 4 comments
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended

Comments

@eliorivero
Copy link
Contributor

eliorivero commented Jul 1, 2019

Describe the bug
While uploading a bunch of images–42 to be exact, most of them using the gallery block and a few with the image block, I started getting red notices on the gallery blocks as shown in the gifs below. Now, despite the red notices, only 5 images out of the last gallery weren't uploaded: all other 37 images were correctly uploaded the first time. However, the last gallery hung up and had to reload the page to upload those 5 images again.

To reproduce
Steps to reproduce the behavior:

  1. Go to a post
  2. Add gallery and image blocks and upload many images at once. I was uploading 42 images.

Expected behavior
Images to be uploaded correctly.

Screenshots
invalidjson
invalidjson2

Desktop (please complete the following information):

  • OS: macOS Mojave
  • Browser: Chrome 75 - 64 bits

Additional context

@swissspidy swissspidy added [Feature] Media Anything that impacts the experience of managing media Needs Testing Needs further testing to be confirmed. REST API Interaction Related to REST API labels Jul 1, 2019
@suziwilson
Copy link

I was able to reproduce the same behavior. I uploaded 44 images into a gallery block and it did NOT generate an error, but when I uploaded 45 images into a gallery block (the same images +1) I DID get the same error.

OS: macOS Mojave
Gutenberg: Version 6.8.0
Browser: Version 78.0.3904.70

@mapk mapk added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Nov 19, 2019
@mapk
Copy link
Contributor

mapk commented Nov 19, 2019

Looks like it might be related to: #10251

@noisysocks noisysocks added [Block] Gallery Affects the Gallery Block - used to display groups of images [Block] Image Affects the Image Block labels Apr 23, 2020
@skorasaurus
Copy link
Member

I'm able to reproduce this in certain conditions and I think the cause of this is the total size (in megabytes) of the images being uploaded, not the number of them.

Based of #25940 as of commit c9b9aa2

Was successful to:
upload about 35 images (all under 20kb each)
upload about 40 images (from 5kb to 600kb each)
upload 3 images (3 mb each)

Received this error with:
upload about 15 images (ranging from 300kb to 3mb each); I

My upload_max_filesize in my php configuration is 1024mb (this is on my local development environment/server) so I'm not sure if this is related to #10251; since I am able to upload the same files of large file sizes individually.

@glendaviesnz
Copy link
Contributor

glendaviesnz commented Sep 10, 2021

On WP 5.8 and Gutenberg 11.4, and with the gallery block refactor merged, and the related upload issue fixed I was not able to replicate this with the gallery refactor experiment enabled, or with it disabled and using the old gallery block format. I uploaded 60 images, including some that were bigger than max upload size, so closing this issue for now. Feel free to open again if you can still replicate with the gallery block experiment enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Block] Image Affects the Image Block [Feature] Media Anything that impacts the experience of managing media REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

7 participants