Support » Plugin: Media Library Assistant » Thumbnail URL coming up blank

  • Resolved nicegamer7


    Hi David,

    I’m having some trouble with MLA. I’m really at a loss with this issue, as I am using the exact same setup on another site and it is working fine.

    Anyways, the issue is the following: inside of MLA’s mla_gallery shortcode, I set mla_alt_ids_value to "{+filelink_url+}|{+thumbnail_url+}|thumb|{+title+}" and then I use my own shortcode to split these values up and insert one alternate shortcode for each item in the gallery. The issue is that {+thumbnail_url+} is being replaced with the empty string. I’ve tried using the assistant to regenerate the thumbnails, but to no avail. I tried using Xdebug and stepping through the shortcode, and as far as I can tell, the WP thumbnails are indeed generated, but for whatever reason (one that I couldn’t determine), MLA can’t seem to find them. Although, it does correctly identify that they already exist when trying to regenerate them in the assistant. I also tried deleting and regenerating them for good measure, but still nothing.

    I suppose I should mention that all the items in the gallery are PDFs. Also, here’s the intermediate shortcode I made, The example usage is very close to what I am doing, except my gallery only has PDFs in it.

    Please let me know if you have any ideas. Thanks!

    The page I need help with: [log in to see the link]

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


    Thanks for your report and for the details of your application; very helpful.

    The {+thumbnail_url+} is extracted from the {+link+} value with a regular expression match that includes the width and height attributes as well. Perhaps that is failing. If you search for ‘thumbnail_url’ in the /Media Library Assistant/includes/class-mla-shortcode-support.php file you will find the code down around lines 1609-1617.

    The mla_alt_ids_value= parameter is evaluated around line 1800-1804. You could have a look at the content of $item_values there to see what the {+thumbnail_url+} and {+link+} values are. You could also hook the mla_gallery_item_values filter just above that to inspect the values in your own code.

    If you find that the link value has changed in a way MLA isn’t processing, let me know.

    You might have a look at the _get_attachment_image_src function around lines 176-226 as well. This function is sometimes involved in processing non-image items like PDFs.

    Any additional details you can provide will be helpful. Thanks for your interest in the plugin.

    Thread Starter nicegamer7


    Thanks for getting back to me. Your comment about {+thumbnail_url+} being extracted from {+link+} helped me out.

    I found that I had a filter on wp_get_attachment_link that was affecting MLA.

    Thanks a million!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.