WordPress.org

Make WordPress Core

#44787 closed defect (bug) (duplicate)

Generic "HTTP Error" when uploading PDFs via Media area, part II

Reported by: BearlyDoug Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.8
Component: Media Keywords:
Focuses: administration Cc:
PR Number:

Description (last modified by SergeyBiryukov)

In an update/continuation of abandoned (not by me) ticket #43310, I need to bring this issue back to the forefront. After one of my Co-workers and I did some additional testing, we have identified the "HTTP Error" is a result of some PHP versions not being able to generate thumbnails from the first page of a PDF (a change that was introduced within the 4.7 release).

The issue is that there is no fall-back option when WordPress is unable to generate thumbnails.

We loaded the Disable PDF Thumbnails plugin on the sites that were returning that "HTTP Error" and were able to successfully upload PDFs without any problems.

Wordpress should auto-detect PDF image thumbnail creation "http errors" and switch to the following fallback upon failure:

function makeworthy_disable_pdf_thumbnails() {
        $fallbacksizes = array(); 
        return $fallbacksizes;              
}            
add_filter('fallback_intermediate_image_sizes', 'makeworthy_disable_pdf_thumbnails');

The other thread (linked above) has some of our system information available, however, I can provide updated details (or FTP/WP-Admin access to the dev that fixes this), as needed.

Change History (2)

#1 @netweb
15 months ago

  • Focuses coding-standards removed

#2 @SergeyBiryukov
15 months ago

  • Description modified (diff)
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there,

Sorry you still haven't got a reply on #43310, but it's still open, so let's continue the discussion there. No need to create a new ticket for the same issue.

Note: See TracTickets for help on using tickets.