Viewing 11 replies - 1 through 11 (of 11 total)
  • Not sure why but if I try to access one of the PDFs directly for example https://tdiforaccess.org/wp-content/uploads/2015/02/2007-3_TDI_World_Vol_38_No_3.pdf the Chrome browser will download the file instead of opening it. If I try to see response headers using web-sniffer.net for that URL, then it turns up a 404 response…

    It looks like something has changed but it’s not the plugin.

    Maybe check your .htaccess file and Apache response header rules?

    Thread Starter doncullen

    (@doncullen)

    Not sure about Apache response header rules; I don’t know what that is, especially much less touch it.

    For .htaccess, this is my .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    That was automatically generated by WordPress. There is no other content in that file.

    That’s all looking good.

    Could you verify if the PDF files are all there? I mean for example the file /wp-content/uploads/2015/02/2007-3_TDI_World_Vol_38_No_3.pdf can you see that via FTP?

    If so, maybe ask your hosting provider why the file would be presented as a download.

    Oh, hang on. Right now it’s working fine… Strange.

    Thread Starter doncullen

    (@doncullen)

    The PDF files are all there.

    I’m the hosting provider; to be exact, I’m using a virtual dedicated server from KAVPS. I have access via ssh (including as root level access) if anything needs to be done via that route.

    As for it working fine, I just checked just now, it’s still not working. Still showing up blank for some, and not blank for others. It’s sporadically failing.

    Recorded a video of me showing what I mean.
    https://www.youtube.com/watch?v=oVKJIfKQuSc&feature=youtu.be

    Very strange this sporadic failing…

    I just tested all links on that page and all work now. Hard refresh, tested again and all still work.

    But a few hours ago this was not the case. Some worked, others didn’t. One that didn’t started working after a few tries. I have really no idea what could cause that.

    A common question would be “have you checked file ownerships and permissions?” but that would not explain why sometimes it works while other times it fails for the same file.

    The only suggestion I can make is to download and install (via FTP) the development version https://downloads.www.ads-software.com/plugin/easy-fancybox.zip , then go to Settings > Media and find in the PDF section the new option “Embed with” and set that to “iFrame tag” which will make the PDF files at least download to the visitors computer if normal display fails again…

    Thread Starter doncullen

    (@doncullen)

    I just went through each link and found seven that consistently fail. The interesting thing is that I uploaded all seven, that fixed three of them; but the remaining four simply will not work even if re-uploaded. Those are:

    Vol. 38 Issue 2 (2007)
    Vol. 40 Issue 2 (2009)
    Vol. 40 Issue 3 (2009)
    Vol. 46 Issue 2 (2015)

    Very strange. I wonder if it’s something to do with the PDF itself? Could the format be abnormal and be breaking when it tries to load it?

    Thread Starter doncullen

    (@doncullen)

    Update: Just installed the beta file you provide. Now all PDFs are loading as quarter-displayed (if at all).

    So I uninstalled it and restored the previous version. But get this, this is the very interesting part:

    If I leave Easy FancyBox disabled, and try clicking on each link, certain PDF’s will download, while others will load right in the browser. I’m trying to make sense of this very inconsistent behavior.

    Thread Starter doncullen

    (@doncullen)

    Edit: re: PDFs displaying as quarter-displayed; I just remembered that this is due to a conflict between your plugin and my theme, and I had to solve it like this:
    https://www.ads-software.com/support/topic/fancy-box-displays-pdf-but-pdf-is-cut-off?replies=6

    Old problem that apparently hasn’t been addressed as of yet.

    Still trying to figure out the PDF issue. But whatever it is, it appears that your plugin isn’t able to detect that it’s trying to download versus displaying, so it simply displays a blank file.

    Thread Starter doncullen

    (@doncullen)

    Posting link to the thread that I posted over at Document Gallery for others to use if they run into the same problem.

    https://www.ads-software.com/support/topic/some-pdfs-download-while-most-open-in-browser?replies=1

    Thread Starter doncullen

    (@doncullen)

    I was able to solve the problem. First, I had to delete the PDFs (just the ones that kept downloading) from the Document Gallery. Second, I deleted the files themselves via FTP. Third, I renamed the files to something else. Fourth, I re-uploaded them via Document Gallery and added them back in, then saved the post.

    Now all of the PDFs are behaving properly. Not sure why it was exhibiting this strange behavior, but works fine now.

    I re-enabled EasyFancy Box, and tested them all out. Working flawlessly.

    But whatever it was, it appears that your plugin isn’t able to detect that it’s trying to download versus displaying, so it simply displays a blank file. May want to add in something to detect that.

    Thanks for trying to help me to troubleshoot the matter!

    Marking this issue as resolved.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Did something change? Clicking on a PDF leads to a blank page’ is closed to new replies.