WordPress.org

Make WordPress Core

Opened 2 months ago

Last modified 7 weeks ago

#52568 new defect (bug)

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

Reported by: 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 2 months ago.
Screenshot of the problem (UI in Spanish (ES-es))

Download all attachments as: .zip

Change History (7)

@borjagq
2 months ago

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

#1 follow-up: @johnbillion
2 months 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
2 months 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
8 weeks 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
8 weeks 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
8 weeks 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
7 weeks 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!

Note: See TracTickets for help on using tickets.