• Resolved Greg Neise

    (@geneise)


    Something odd is happening. When I place this shortcode on a test page:

    [mla_gallery size=full columns=4 attachment_category=birding-archive post_mime_type=application/pdf post_parent=all link=file]
    mla_caption=’{+title+}
    [/mla_gallery]

    … the gallery loads as expected, with thumbnails, BUT ONLY IN PREVIEW MODE.

    So, this link shows no thumbnails (featured images):
    https://www.aba.org/test-bunny-single-post/

    But the preview link displays the 3 thumbnails that I have placed in this test:
    https://www.aba.org/test-bunny-single-post/?preview_id=1828&_thumbnail_id=-1&preview=true

    I’m trying to build what should be a simple pdf gallery to browse files, and am wits-end. I can’t figure out what I’m doing wrong here. I suspect it might have something to do with css minification (maybe?), but I’ve toggled all minification on and off (and cleared caches to test), with the same results.

    TIA for any insight.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and thanks as well for including the links to both versions of the page; very helpful.

    In preview mode the IMG tag SRC attribute has the file name, as expected:

    <dl class="gallery-item ">
    <dt class="gallery-icon ">
    <a href="https://www.aba.org/themencode-pdf-viewer/?file=https://www.aba.org/wp-content/uploads/2018/02/ABA-birding.pdf#zoom=page-fit"><img aria-describedby="mla_gallery-1-2053" width="1024" height="1372" src="https://www.aba.org/wp-content/uploads/2018/02/Birding-10-2017.jpg" class="attachment-full size-full" alt=""></a>
    </dt>
    <dd class="wp-caption-text gallery-caption" id="mla_gallery-1-2053">
    <a href="https://www.aba.org/themencode-pdf-viewer/?file=https://www.aba.org/wp-content/uploads/2018/02/ABA-birding.pdf#zoom=page-fit" target="_blank">Birding October 2017</a>
    </dd></dl>
    

    The version returned by the site’s front end has a different value for the SRC atttribute:

    <dl class="gallery-item ">
    <dt class="gallery-icon ">
    <a href="https://www.aba.org/themencode-pdf-viewer/?file=https://www.aba.org/wp-content/uploads/2018/02/ABA-birding.pdf#zoom=page-fit"><img aria-describedby="mla_gallery-1-2053" width="1024" height="1372" src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="attachment-full size-full" alt=""></a>
    </dt>
    <dd class="wp-caption-text gallery-caption" id="mla_gallery-1-2053">
    <a href="https://www.aba.org/themencode-pdf-viewer/?file=https://www.aba.org/wp-content/uploads/2018/02/ABA-birding.pdf#zoom=page-fit" target="_blank">Birding October 2017</a>
    </dd></dl>
    

    Some function of your theme or another plugin is altering the SRC attribute and not matching the value to the proper image file. I do not believe MLA has any role in this issue.

    I will leave this topic unresolved for now in case you can provide more details of any MLA involvement. I regret that I cannot give you more specific or useful help at this point. Thanks for your understanding and your interest in the plugin.

    Thread Starter Greg Neise

    (@geneise)

    Hi David, thank you for the reply. As a way of testing things, I took the same short code and just changed the file type, then assigned one of the images the same attachment category:

    [mla_gallery size=full columns=4 attachment_category=birding-archive post_mime_type=image/jpeg post_parent=all link=file]
    mla_caption=’{+title+}
    [/mla_gallery]

    That is working as expected on the site’s front end:

    https://www.aba.org/test-bunny-single-post/

    … not sure what to make of that.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update. With the change in file type the content of the link and IMG tags has changed singificantly:

    <dl class="gallery-item ">
    <dt class="gallery-icon portrait">
    <a href="https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1.jpg"><img aria-describedby="mla_gallery-1-47532" width="1024" height="1247" src="https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1.jpg" class="attachment-full size-full" alt="" srcset="https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-200x244.jpg 200w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-246x300.jpg 246w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-400x487.jpg 400w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-500x609.jpg 500w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-600x731.jpg 600w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-700x852.jpg 700w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-723x880.jpg 723w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-768x935.jpg 768w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-800x974.jpg 800w, https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1.jpg 1024w" sizes="(max-width: 1024px) 100vw, 1024px" data-attachment-id="47532" data-permalink="https://www.aba.org/?attachment_id=47532" data-orig-file="https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1.jpg" data-orig-size="1024,1247" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="birding-cover_v1_no1" data-image-description="" data-image-caption="" data-medium-file="https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-246x300.jpg" data-large-file="https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1-723x880.jpg"></a>
    </dt>
    <dd class="wp-caption-text gallery-caption" id="mla_gallery-1-47532">
    <a href="https://www.aba.org/wp-content/uploads/2022/01/birding-cover_v1_no1.jpg" target="_blank">birding-cover_v1_no1</a>
    </dd></dl>
    

    Note that the link in the earlier PDF case goes to a “pdf-viewer”. Perhaps the theme has special features for PDF viewing that alters the link and the IMG tag?

    Thread Starter Greg Neise

    (@geneise)

    David, thanks again. It seems that the PDF viewer we use — which intercepts links that go directly to PDF files and forces them into the viewer is replacing the MLA gallery links completely.

    I think you can mark this as resolved, and I need to figure out another way to create our archive galleries. Thank you *very* much for your time and effort.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Odd Thumbnail Problem with mla_gallery Shortcode’ is closed to new replies.