• Resolved gsfergusson

    (@gsfergusson)


    When “Lightbox Effects” is set to FancyBox and “Only apply to NextGEN and WordPress images,” clicking on a thumbnail image linked to a PDF file causes the PDF to be displayed as an image, not as a PDF file. Needless to say, this ain’t right! By setting Lightbox Effects to “Only apply to NextGEN images” the PDF displays correctly.

    Has anyone else noticed this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor Imagely

    (@imagely)

    Hi @gsfergusson,

    I don’t think we are being aware of such a case. Could you please provide us with an example of how the HTML markup looks like for the PDF links?

    Alternately, please feel free to let us know what’s the PDF plugin’s name in case that you are using one.

    • This reply was modified 2 years, 5 months ago by Imagely.
    Thread Starter gsfergusson

    (@gsfergusson)

    Hi! Thanks for the response.

    On ONE site I’m using PDF Embedder Version 4.6.4 by WP PDF Embedder Team, on the other site I’m not. This same problem persists on both sites so I don’t think the PDF Embedder is to blame.

    Further testing shows that setting NextGEN’s Lightbox setting to Fancybox and “Try to apply to all images that link to image files” resolves the issue. However, the problem when NextGEN’s Lightbox setting is set to Fancybox and “Only apply to NextGEN and WordPress images” persists.

    Here’s an example link that results in the PDF file being loaded into the lightbox rather than being displayed as a PDF when Lightbox is set to only NextGEN and WordPress images:

    <a href="https://whitefieldlibrary.org/wp-content/uploads/SummerReadingChallenge.pdf" target="_blank" rel="noopener"><img src="https://whitefieldlibrary.org/wp-content/uploads/summerBINGO-232x300.png" /></a>

    So this workaround I’ve discovered helps for now, but I’ve had issues in the past when setting the Lightbox setting to anything but “NextGEN and WordPress images” so we’ll see. The Fancybox lightbox doesn’t work at all when the Lightbox setting is set to “Apply only to NextGEN images” but I think this is a known issue.

    Thread Starter gsfergusson

    (@gsfergusson)

    And ironically, the above link works fine on this site which probably doesn’t have the NextGEN plugin installed ??

    Plugin Contributor Imagely

    (@imagely)

    Thanks for the HTML example of the PDF link. We’ve copied it to one of our test sites and pasted it into a page using a "Custom HTML" Gutenberg module and it seems to always open the PDF link ( without trying to open it in the lightbox ) while using Fancyboxand having "Only apply to NextGEN and WordPress images" set.

    Could you please let us know what editor are you using and how are you inserting the link? I’m wondering if it’d behave differently in case of using a third party page editor or a different module.

    Also, could you please confirm that you are using the latest version of NextGen Gallery?

    • This reply was modified 2 years, 5 months ago by Imagely.
    • This reply was modified 2 years, 5 months ago by Imagely.
    Thread Starter gsfergusson

    (@gsfergusson)

    We’ve been using the Classic Editor with the Classic Editor plugin Version 1.6.2 by WordPress Contributors on both sites where we’ve had this problem. I’ve never gotten used to the Block Editor though I’ve begun to play around with it some…

    To insert the thumbnail I use the “Add Media” button, select the thumbnail image, and then link it to a custom URL pointing to the PDF file.

    We’re using NextGEN Version 3.26

    I will try using the Block Editor to reproduce this problem!

    Thread Starter gsfergusson

    (@gsfergusson)

    OK, I added the thumbnail and link to PDF using the block editor. Previewing and clicking on the thumbnail produces the same problem, the PDF doesn’t display, it gets loaded into a lightbox and displays gibberish.

    It generated this code:

    
    <figure class="wp-block-image size-large is-resized"><a href="https://whitefieldlibrary.org/wp-content/uploads/summerBINGO.pdf"><img src="https://whitefieldlibrary.org/wp-content/uploads/summerBINGO-791x1024.png" alt="" width="198" height="256" /></a></figure>

    George-

    Thread Starter gsfergusson

    (@gsfergusson)

    I published the page. I’ll leave it up for a while:

    https://whitefieldlibrary.org/play-page/

    G-

    Plugin Contributor Imagely

    (@imagely)

    I see. We were able to replicate it with Classic Editor and Fancybox. Switching to SimpleLightbox allowed it work properly though. Worth mentioning that we aren’t actively testing anymore our plugins with Classic Editor. Fancybox is also only partially supported for the backwards compatibility reasons.

    If using Block Editor you can try adding the PDF link via "Custom HTML" module instead as it appears to be working for us even while using Fancybox:

    <a href="https://whitefieldlibrary.org/wp-content/uploads/SummerReadingChallenge.pdf" target="_blank" rel="noopener"><img src="https://whitefieldlibrary.org/wp-content/uploads/summerBINGO-232x300.png" /></a>

    Thread Starter gsfergusson

    (@gsfergusson)

    Thanks for taking the time to look into this. The simplelightbox indeed works, though I don’t like it as much as the fancybox. I do hope you keep it!

    We’re trying to make the switch to the block editor. It’s happening slowly… Even if/when we use the block editor, we’ve got to switch back to Classic to insert a NextGEN singlepic. That’s an annoyance.

    Will try the Custom HTML trick.

    Also trying to talk the people in charge of money to purchase NextGEN so we can have access to all that other neat stuff but it’s hard convincing small non-profits to spend hard to come by money.

    Thanks again!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Thumbnails Linked to PDF Fail to properly display the PDF’ is closed to new replies.