MLA and Twenty Sixteen Theme
-
I am using MLA on a number of websites and it is a great and valuable plugin.
However, I am attempting to use it on a child theme of 2016, and the mla shortcode does not respond.
I have tried:
[mla_gallery]
<code>[mla_gallery]</code>
`<[mla_gallery]>’
And I get no response.
If I change thems back to the default 2016 theme, I still get no response.
So I installed 2012 as a test, switch to that theme, and lo and behold, there is my MLA content.
This project is too far along to develop a new child theme.
Are ther any solutions out there?Thank you!
The page I need help with: [log in to see the link]
-
Thanks for your report. I regret the trouble you’re having with MLA in your theme.
I have just run a few tests on my own system and the
[mla_gallery]shortcode is working without errors in the default 2016 theme. I will need more information about your site to investigate further.You wrote “I get no response.” Does that mean that “[mla_gallery]” appears as text in the body of your post/page, or does it mean that nothing appears, i.e., the shortcode runs and returns an empty gallery? The test page you give a link to appears to be returning empty galleries; is that right?
If you get an empty gallery, you can try
[mla_gallery post_parent=all posts_per_page=10]to see if the problem is related to item/parent issues. You can also try[mla_gallery mla_debug=true]to get detailed debug information about the problem. If that works you can post the information here for my review.You can go to the Settings/Media Library Assistant Debug tab to see if there is more information in the error log, and you can try
[mla_gallery mla_debug=log]to write information to the log instead of the screen. If you do find information there you can post it for my review.I will leave this topic unresolved until I get more information. Anything you can provide will be helpful.
Thank you for your quick and careful response!
I am getting no output while using the 2016 theme, but I am getting output with the 2012 theme.
I ran the [mla_gallery post_parent=all posts_per_page=10] shortcode in the 2016 theme, and got a series of images – so perhaps there is some problem with how I have set up parent/child relationships.I ran the debug code and got this output:
520 mla_debug REQUEST = array ( )521 mla_debug attributes = array ( ‘mla_debug’ => ‘true’, ‘mla_page_parameter’ => ‘mla_paginate_current’, )
522 mla_debug arguments = array ( ‘size’ => ‘thumbnail’, ‘itemtag’ => ‘figure’, ‘icontag’ => ‘div’, ‘captiontag’ => ‘figcaption’, ‘columns’ => ‘3’, ‘link’ => ‘permalink’, ‘id’ => NULL, ‘style’ => NULL, ‘type’ => ‘default’, ‘thumb_width’ => 75, ‘thumb_height’ => 75, ‘thumbnail_size’ => ‘thumbnail’, ‘slide_size’ => ‘large’, ‘slideshow_height’ => 500, ‘fx’ => ‘fade’, ‘timeout’ => 4000, ‘speed’ => 1000, ‘pause’ => NULL, ‘mla_output’ => ‘gallery’, ‘mla_style’ => ‘default’, ‘mla_markup’ => ‘default’, ‘mla_float’ => ‘left’, ‘mla_itemwidth’ => ‘calculate’, ‘mla_margin’ => ‘1.5%’, ‘mla_target’ => ”, ‘mla_debug’ => ‘true’, ‘mla_named_transfer’ => false, ‘mla_viewer’ => false, ‘mla_single_thread’ => false, ‘mla_viewer_extensions’ => ‘ai,eps,pdf,ps’, ‘mla_viewer_limit’ => ‘0’, ‘mla_viewer_width’ => ‘0’, ‘mla_viewer_height’ => ‘0’, ‘mla_viewer_best_fit’ => NULL, ‘mla_viewer_page’ => ‘1’, ‘mla_viewer_resolution’ => ‘0’, ‘mla_viewer_quality’ => ‘0’, ‘mla_viewer_type’ => ”, ‘mla_alt_shortcode’ => NULL, ‘mla_alt_ids_name’ => ‘ids’, ‘mla_alt_ids_value’ => NULL, ‘mla_end_size’ => 1, ‘mla_mid_size’ => 2, ‘mla_prev_text’ => ‘« Previous’, ‘mla_next_text’ => ‘Next »’, ‘mla_paginate_type’ => ‘plain’, ‘mla_paginate_rows’ => NULL, ‘mla_link_attributes’ => ”, ‘mla_link_class’ => ”, ‘mla_link_href’ => ”, ‘mla_link_text’ => ”, ‘mla_nolink_text’ => ”, ‘mla_rollover_text’ => ”, ‘mla_image_class’ => ”, ‘mla_image_alt’ => ”, ‘mla_image_attributes’ => ”, ‘mla_caption’ => ”, )
mla_debug is_archive() = false
mla_debug is_search() = false
mla_debug $wp_filter[posts_where] = Priority: 2147483647 MLAShortcode_Support::mla_shortcode_query_posts_where_filter => MLAShortcode_Support::mla_shortcode_query_posts_where_filter()
mla_debug $wp_filter[posts_orderby] = Priority: 2147483647 MLAShortcode_Support::mla_shortcode_query_posts_orderby_filter => MLAShortcode_Support::mla_shortcode_query_posts_orderby_filter()
mla_debug WHERE filter = ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’
mla_debug modified WHERE filter = ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’
mla_debug JOIN filter = ”
mla_debug ORDER BY filter, incoming = ‘wp_posts.post_date DESC’
Replacement ORDER BY clause = ‘wp_posts.menu_order ASC, wp_posts.ID ASC’mla_debug posts_clauses filter = array ( ‘where’ => ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’, ‘groupby’ => ”, ‘join’ => ”, ‘orderby’ => ‘wp_posts.menu_order ASC, wp_posts.ID ASC’, ‘distinct’ => ”, ‘fields’ => ‘wp_posts.*’, ‘limits’ => ”, )
mla_debug posts_clauses_request filter = array ( ‘where’ => ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’, ‘groupby’ => ”, ‘join’ => ”, ‘orderby’ => ‘wp_posts.menu_order ASC, wp_posts.ID ASC’, ‘distinct’ => ”, ‘fields’ => ‘wp_posts.*’, ‘limits’ => ”, )
mla_debug query = array ( ‘post_type’ => array ( 0 => ‘attachment’, ), ‘post_status’ => array ( 0 => ‘inherit’, ), ‘post_mime_type’ => ‘image’, ‘nopaging’ => true, ‘post_parent’ => 465, ‘ignore_sticky_posts’ => true, ‘no_found_rows’ => false, )
mla_debug request = ‘SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’)) ORDER BY wp_posts.menu_order ASC, wp_posts.ID ASC ‘
mla_debug query_vars = array ( ‘post_type’ => array ( 0 => ‘attachment’, ), ‘post_status’ => array ( 0 => ‘inherit’, ), ‘post_mime_type’ => ‘image’, ‘nopaging’ => true, ‘post_parent’ => 465, ‘ignore_sticky_posts’ => true, ‘no_found_rows’ => false, ‘error’ => ”, ‘m’ => ”, ‘p’ => 0, ‘subpost’ => ”, ‘subpost_id’ => ”, ‘attachment’ => ”, ‘attachment_id’ => 0, ‘name’ => ”, ‘static’ => ”, ‘pagename’ => ”, ‘page_id’ => 0, ‘second’ => ”, ‘minute’ => ”, ‘hour’ => ”, ‘day’ => 0, ‘monthnum’ => 0, ‘year’ => 0, ‘w’ => 0, ‘category_name’ => ”, ‘tag’ => ”, ‘cat’ => ”, ‘tag_id’ => ”, ‘author’ => ”, ‘author_name’ => ”, ‘feed’ => ”, ‘tb’ => ”, ‘paged’ => 0, ‘meta_key’ => ”, ‘meta_value’ => ”, ‘preview’ => ”, ‘s’ => ”, ‘sentence’ => ”, ‘title’ => ”, ‘fields’ => ”, ‘menu_order’ => ”, ’embed’ => ”, ‘category__in’ => array ( ), ‘category__not_in’ => array ( ), ‘category__and’ => array ( ), ‘post__in’ => array ( ), ‘post__not_in’ => array ( ), ‘post_name__in’ => array ( ), ‘tag__in’ => array ( ), ‘tag__not_in’ => array ( ), ‘tag__and’ => array ( ), ‘tag_slug__in’ => array ( ), ‘tag_slug__and’ => array ( ), ‘post_parent__in’ => array ( ), ‘post_parent__not_in’ => array ( ), ‘author__in’ => array ( ), ‘author__not_in’ => array ( ), ‘suppress_filters’ => false, ‘cache_results’ => true, ‘update_post_term_cache’ => true, ‘lazy_load_term_meta’ => true, ‘update_post_meta_cache’ => true, ‘posts_per_page’ => 10, ‘comments_per_page’ => ’50’, ‘order’ => ‘DESC’, )
mla_debug post_count = 0
mla_debug empty gallery, query = array ( ‘mla_debug’ => ‘true’, ‘mla_page_parameter’ => ‘mla_paginate_current’, )
-Kurt
If you go to this page, you can see the results: https://wp.vapa.org/newsletters/
Thanks for your quick testing and for posting the debug information. Everything looks perfectly normal.
Your test page is titled “Newsletters”. Is it possible that the items attached to the page are not images, e.g., you have attached one or more PDF documents? If so, you can add a
post_mime_typeparameter to select them.You wrote “I installed 2012 as a test, switch to that theme, and lo and behold, there is my MLA content.” Is the content there a gallery of images or something else?
Can you run the
[mla_gallery mla_debug=true]test with the 2012 theme and post the output for comparison?On the Media/Assistant admin screen you can type “465” in the Search Media box to get a display of all items attached to page 465. Does that list look right? Does it include image and non-image types?
Thanks for your patience and your help.
Here is the debug output from the 2012 theme:
520 mla_debug REQUEST = array ( )521 mla_debug attributes = array ( ‘mla_debug’ => ‘true’, ‘mla_page_parameter’ => ‘mla_paginate_current’, )
522 mla_debug arguments = array ( ‘size’ => ‘thumbnail’, ‘itemtag’ => ‘dl’, ‘icontag’ => ‘dt’, ‘captiontag’ => ‘dd’, ‘columns’ => ‘3’, ‘link’ => ‘permalink’, ‘id’ => NULL, ‘style’ => NULL, ‘type’ => ‘default’, ‘thumb_width’ => 75, ‘thumb_height’ => 75, ‘thumbnail_size’ => ‘thumbnail’, ‘slide_size’ => ‘large’, ‘slideshow_height’ => 500, ‘fx’ => ‘fade’, ‘timeout’ => 4000, ‘speed’ => 1000, ‘pause’ => NULL, ‘mla_output’ => ‘gallery’, ‘mla_style’ => ‘default’, ‘mla_markup’ => ‘default’, ‘mla_float’ => ‘left’, ‘mla_itemwidth’ => ‘calculate’, ‘mla_margin’ => ‘1.5%’, ‘mla_target’ => ”, ‘mla_debug’ => ‘true’, ‘mla_named_transfer’ => false, ‘mla_viewer’ => false, ‘mla_single_thread’ => false, ‘mla_viewer_extensions’ => ‘ai,eps,pdf,ps’, ‘mla_viewer_limit’ => ‘0’, ‘mla_viewer_width’ => ‘0’, ‘mla_viewer_height’ => ‘0’, ‘mla_viewer_best_fit’ => NULL, ‘mla_viewer_page’ => ‘1’, ‘mla_viewer_resolution’ => ‘0’, ‘mla_viewer_quality’ => ‘0’, ‘mla_viewer_type’ => ”, ‘mla_alt_shortcode’ => NULL, ‘mla_alt_ids_name’ => ‘ids’, ‘mla_alt_ids_value’ => NULL, ‘mla_end_size’ => 1, ‘mla_mid_size’ => 2, ‘mla_prev_text’ => ‘« Previous’, ‘mla_next_text’ => ‘Next »’, ‘mla_paginate_type’ => ‘plain’, ‘mla_paginate_rows’ => NULL, ‘mla_link_attributes’ => ”, ‘mla_link_class’ => ”, ‘mla_link_href’ => ”, ‘mla_link_text’ => ”, ‘mla_nolink_text’ => ”, ‘mla_rollover_text’ => ”, ‘mla_image_class’ => ”, ‘mla_image_alt’ => ”, ‘mla_image_attributes’ => ”, ‘mla_caption’ => ”, )
mla_debug is_archive() = false
mla_debug is_search() = false
mla_debug $wp_filter[posts_where] = Priority: 2147483647 MLAShortcode_Support::mla_shortcode_query_posts_where_filter => MLAShortcode_Support::mla_shortcode_query_posts_where_filter()
mla_debug $wp_filter[posts_orderby] = Priority: 2147483647 MLAShortcode_Support::mla_shortcode_query_posts_orderby_filter => MLAShortcode_Support::mla_shortcode_query_posts_orderby_filter()
mla_debug WHERE filter = ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’
mla_debug modified WHERE filter = ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’
mla_debug JOIN filter = ”
mla_debug ORDER BY filter, incoming = ‘wp_posts.post_date DESC’
Replacement ORDER BY clause = ‘wp_posts.menu_order ASC, wp_posts.ID ASC’mla_debug posts_clauses filter = array ( ‘where’ => ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’, ‘groupby’ => ”, ‘join’ => ”, ‘orderby’ => ‘wp_posts.menu_order ASC, wp_posts.ID ASC’, ‘distinct’ => ”, ‘fields’ => ‘wp_posts.*’, ‘limits’ => ”, )
mla_debug posts_clauses_request filter = array ( ‘where’ => ‘ AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’))’, ‘groupby’ => ”, ‘join’ => ”, ‘orderby’ => ‘wp_posts.menu_order ASC, wp_posts.ID ASC’, ‘distinct’ => ”, ‘fields’ => ‘wp_posts.*’, ‘limits’ => ”, )
mla_debug query = array ( ‘post_type’ => array ( 0 => ‘attachment’, ), ‘post_status’ => array ( 0 => ‘inherit’, ), ‘post_mime_type’ => ‘image’, ‘nopaging’ => true, ‘post_parent’ => 465, ‘ignore_sticky_posts’ => true, ‘no_found_rows’ => false, )
mla_debug request = ‘SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_parent = 465 AND (wp_posts.post_mime_type LIKE \’image/%\’) AND wp_posts.post_type = \’attachment\’ AND ((wp_posts.post_status = \’inherit\’)) ORDER BY wp_posts.menu_order ASC, wp_posts.ID ASC ‘
mla_debug query_vars = array ( ‘post_type’ => array ( 0 => ‘attachment’, ), ‘post_status’ => array ( 0 => ‘inherit’, ), ‘post_mime_type’ => ‘image’, ‘nopaging’ => true, ‘post_parent’ => 465, ‘ignore_sticky_posts’ => true, ‘no_found_rows’ => false, ‘error’ => ”, ‘m’ => ”, ‘p’ => 0, ‘subpost’ => ”, ‘subpost_id’ => ”, ‘attachment’ => ”, ‘attachment_id’ => 0, ‘name’ => ”, ‘static’ => ”, ‘pagename’ => ”, ‘page_id’ => 0, ‘second’ => ”, ‘minute’ => ”, ‘hour’ => ”, ‘day’ => 0, ‘monthnum’ => 0, ‘year’ => 0, ‘w’ => 0, ‘category_name’ => ”, ‘tag’ => ”, ‘cat’ => ”, ‘tag_id’ => ”, ‘author’ => ”, ‘author_name’ => ”, ‘feed’ => ”, ‘tb’ => ”, ‘paged’ => 0, ‘meta_key’ => ”, ‘meta_value’ => ”, ‘preview’ => ”, ‘s’ => ”, ‘sentence’ => ”, ‘title’ => ”, ‘fields’ => ”, ‘menu_order’ => ”, ’embed’ => ”, ‘category__in’ => array ( ), ‘category__not_in’ => array ( ), ‘category__and’ => array ( ), ‘post__in’ => array ( ), ‘post__not_in’ => array ( ), ‘post_name__in’ => array ( ), ‘tag__in’ => array ( ), ‘tag__not_in’ => array ( ), ‘tag__and’ => array ( ), ‘tag_slug__in’ => array ( ), ‘tag_slug__and’ => array ( ), ‘post_parent__in’ => array ( ), ‘post_parent__not_in’ => array ( ), ‘author__in’ => array ( ), ‘author__not_in’ => array ( ), ‘suppress_filters’ => false, ‘cache_results’ => true, ‘update_post_term_cache’ => true, ‘lazy_load_term_meta’ => true, ‘update_post_meta_cache’ => true, ‘posts_per_page’ => 10, ‘comments_per_page’ => ’50’, ‘order’ => ‘DESC’, )
mla_debug post_count = 0
mla_debug empty gallery, query = array ( ‘mla_debug’ => ‘true’, ‘mla_page_parameter’ => ‘mla_paginate_current’, )
I ran the raw shortcode [mla_gallery] again on the 2012 theme and I got the same results that I did when I did it on the 2016.
Since I had different output in 2012 than 2016 yesterday and nothing else changed, there is clearly something wrong with me.
I was careful to test the same shortcode and change only the themes to diagnose the issue, but I must have actually tested two different versions of the shortcode – how I did that I will never know!Most of what I will be interested in is pdfs, as you deduced, so that would explain why there is nothing showing with all default settings.
Sorry for the confusion, but thank you for straightening me out!
Thanks again.
Great plugin.Over the years I have tried a number of others, but none have the flexibility of this one, and some even interfere with other plugins.
Yours stays within its own computing space and works simply enough to train editors with little fuss.If there is one change I would make, it is to show the att categories by default on the attachment details popup page – the editors tend to miss it and then wonder why their media isn’t showing where they want it.
Thanks for your updates with the good news. I checked the “Newsletters” page you linked to and it looks great.
Thanks as well for your overall comments on the plugin. Positive feedback and reviews are great motivators to keep working on the plugin and supporting its users.
You wrote “show the att categories by default on the attachment details popup page“. MLA doesn’t do that by default because it requires accessing the server to get the values. However, if that’s not a problem for your application you can get what you want with a settings change:
- Navigate to the Settings/Media Library Assistant General tab.
- Scroll down to the “Media Manager/Media Grid Enhancements” section.
- Check the “Media Manager auto-fill meta boxes” box.
- Scroll to the bottom of the page and click “Save Changes” to record the new setting.
I hope that change will be of use. I am leaving this topic resolved, but please update it if you have any problems or further questions regarding the use of
[mla_gallery]to display the PDFs in your application. Thanks for your sustained interest in the plugin.
The topic ‘MLA and Twenty Sixteen Theme’ is closed to new replies.