• I updated to the latest version of this plugin and suddenly had this old beauty of a problem causing trouble when downloading documents and having them all corrupted.

    Now, I want to share my solution to you who have run into the same issue.
    File: \wp-content\plugins\wp-document-revisions\includes\class-wp-document-revisions.php:
    Row: 67:
    Code:
    add_filter( 'template_include', array(&$this, 'serve_file'), 15, 1 ); // Changed from 10 to 15 which fixed the corruption of files

    Now, the change of priority somehow takes care of all the problems I had with corrupted files, probably because some other plugin or theme file hook in on template_include filter.

    So this is not a request for solution, but just a work around that will be helpful

  • The topic ‘Corrupted files (PDF, DocX) on download’ is closed to new replies.