Make WordPress Core

Opened 4 years ago

Last modified 20 months ago

#52568 new defect (bug)

"response is not a valid JSON response" when uploading certain PDF

Reported by: borjagq's profile borjagq Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.6.1
Component: Media Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by johnbillion)

When uploading certain PDF files -either through the media library or through the post editor- an error message appears saying "response is not a valid JSON response". In appearance, it seems like the file was not successfully uploaded, but once the page is refreshed the file appears in the library as if no error had occurred.

I have tried these problematic PDF files on several WordPress installations -all of them running WP 5.6.1- and the wrongful behavior happens in all of them. However, not all PDF files cause this issue. It seems to be some sort of error caused by these problematic PDFs in combination with WordPress.

I have tried to revalidate these PDFs using Acrobat, but the error keeps appearing. This makes me believe that there's no problem with bad PDF formatting.

Attachments (1)

8f3b5d58-f5d9-4d9c-b319-9dcf4f48a4f1.jpg (17.4 KB) - added by borjagq 4 years ago.
Screenshot of the problem (UI in Spanish (ES-es))

Download all attachments as: .zip

Change History (9)

@borjagq
4 years ago

Screenshot of the problem (UI in Spanish (ES-es))

#1 follow-up: @johnbillion
4 years ago

  • Description modified (diff)
  • Keywords reporter-feedback added

Thanks for the report @borjagq . Are you able to upload the PDF files somewhere and link to them here? As long as there's no sensitive information in them of course.

#2 in reply to: ↑ 1 @borjagq
4 years ago

Replying to johnbillion:

Thanks for the report @borjagq . Are you able to upload the PDF files somewhere and link to them here? As long as there's no sensitive information in them of course.

I can paste here the public URL of it. Here it is: http://fuentedevida.anue.org/wp-content/uploads/2021/02/COVID-19-y-explotación-sexual.pdf

#3 follow-up: @Mista-Flo
4 years ago

Hi @borjagq, the link seems dead now, can you provide another one? I tried to upload some PDF files but could not reproduce the issue. Could you also share the steps to reproduces please, in which context did you upload this PDF, in the media library? In a post content?

#4 in reply to: ↑ 3 @borjagq
4 years ago

Replying to Mista-Flo:

Hi @borjagq, the link seems dead now, can you provide another one? I tried to upload some PDF files but could not reproduce the issue. Could you also share the steps to reproduces please, in which context did you upload this PDF, in the media library? In a post content?

Of course! Here it is: https://fuentedevida.anue.org/wp-content/uploads/2021/02/Covid-19-y-explotacion-sexual.pdf

#5 follow-up: @Mista-Flo
4 years ago

Thanks @borjagq I tried on last trunk version of Core, and I can't reproduce the issue in different uploads method.

#6 in reply to: ↑ 5 @borjagq
4 years ago

Hi, @Mista-Flo !!

Apparently, someone in the team replaced the buggy PDF with a clean one without my knowledge.

This one does trigger the error: https://anue.org/wp-content/uploads/2021/02/14FF.pdf

I have blocked the file to prevent anyone from making changes, so it doesn't happen anymore.

I have tried to upload it on a clean install of the current version of Core and the two previous ones and the bug appears on all of them.

Sorry for the inconvenience and thank you for your time!

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


20 months ago

#8 @antpb
20 months ago

Hi @borjagq is that PDF still a problem? I suspect something has been fixed in the time since your last comment as I cant reproduce the error with that PDF file.

If you can confirm if this is fixed now we'll close the issue. If we get no response we'll close it after some time.

Thank you!

Note: See TracTickets for help on using tickets.