Title: MLA errors when using plugin
Last modified: August 22, 2016

---

# MLA errors when using plugin

 *  Resolved [jmccarty](https://wordpress.org/support/users/jmccarty/)
 * (@jmccarty)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/)
 * Each time I click “Assistant” under Media in the Dashboard, I get errors. Exactly
   2 errors, both with the same time stamp.
 * The error is:
    “PHP Warning: Invalid argument supplied for foreach() in /nfs/
   webroot/html/wp-content/plugins/media-library-assistant/includes/class-mla-data.
   php on line 3055”
 * I don’t see any plugin misbehavior, but these entries are a distraction when 
   I monitor my PHP error log. What can I do to get rid of these errors?
 * Thanks for your help!
 * [https://wordpress.org/plugins/media-library-assistant/](https://wordpress.org/plugins/media-library-assistant/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730644)
 * Thanks for your report and for including the full text of your error messages;
   very helpful.
 * Line 3055 is part of the code analyzing the “where-used” information for the 
   items in the Media/Assistant submenu table. In the current MLA version, this 
   part of the code runs even if you disable all of the “where-used” categories.
   I will fix that in my next release, and I appreciate learning about it from your
   report. I will update this topic when the fix is posted to the MLA Development
   Version here in the Repository so you can get some interim relief.
 * The real answer is that you have two Media Library items with non-empty, non-
   array values in the “sizes” element of the “Attachment Metadata” (`image_meta`)
   array. The “sizes” array usually has values for the “thumbnail”, “medium” and
   other intermediate image sizes.
 * If you can find the damaged items I would be very interested in what their Attachment
   Metadata looks like. You can see this towards the bottom of the Media/Edit Media
   screen. You may have other problems with these items, so finding them and fixing
   or deleting them may be in order.
 * I will update this topic when I have a new MLA version you can try. If you do
   more investigation to find the damaged items I would be interested in any additional
   information you can provide. Thanks for your interest in the plugin.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730790)
 * I have uploaded a Development Version that avoids the “PHP Warning” message for
   damaged `sizes` arrays. The Development Version also avoids running the analysis
   code when all four “where-used” categories are disabled.
 * If you’d like to give it a try, let me know if you need detailed instructions
   to get it uploaded to your site. I will leave this topic unresolved until the
   fixes go out in an official MLA version.
 * Thanks for your patience.
 *  Thread Starter [jmccarty](https://wordpress.org/support/users/jmccarty/)
 * (@jmccarty)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730796)
 * Hi, David. Thanks for the quick response!
 * I’ll give the Development Version a try, so please do send instructions. I looked
   for a download, and didn’t find it.
 * I very much appreciate your plugin. I have almost 500 objects in my Media Library,
   and Media Library Assistant makes a quick find easy!
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730799)
 * Thanks for the good words and for your willingness to try the Development Version.
   To get it, follow these steps:
    1.  Go to the Developers tab of the Media Library Assistant entry in the Repository.
    2.  Scroll down to the “Other Versions” section and click “Development Version”.
    3.  Download the ZIP archive to your computer, somewhere you can find it.
    4.  Login to your site’s Admin area and navigate to Plugins/Installed Plugins.
    5.  Find Media Library Assistant and deactivate it.
    6.  Find Media Library Assistant and delete it. You will not lose any settings.
    7.  Go to Plugins/Add New.
    8.  Click “Upload Plugin”, to the right of the Add Plugins title.
    9.  “Browse…” to the location of the ZIP Archive and click on it.
    10. Click “Install Now”, to the right of “Browse…”
    11. When the install completes, click “Activate Plugin” at the bottom of the screen.
    12. When the activation completes, scroll down to “Media Library Assistant” and
        look for a date like “20150130” at the start of the Description. That’s how
        you know you have a Development Version.
 * That’s it. I don’t change the version number of the Development Version, so you
   will be notified when the next official version comes out and the normal update
   process will continue to work.
 * Let me know how the Development Version works for you.
 *  Thread Starter [jmccarty](https://wordpress.org/support/users/jmccarty/)
 * (@jmccarty)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730832)
 * The development version has resolved the problem. No more error messages when
   clicking “Assistant.” Thank you very much for this great plugin, and also for
   your very quick resolution of this problem.
 * I’ll still locate the two offending objects to help you analyze what happened.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730963)
 * I have released MLA version 2.02, which contains the code to avoid the “PHP Warning”
   message for damaged sizes arrays. The new version also avoids running the analysis
   code when all four “where-used” categories are disabled.
 * I am marking this topic resolved, but please update it if you have any problems
   or questions regarding these enhancements in the new version.
 * Thanks for your help and your interest in the plugin.
 *  [Knut.Hildebrandt](https://wordpress.org/support/users/knuthildebrandt/)
 * (@knuthildebrandt)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730993)
 * Great, now it works like a charm.
 * Thanks a lot for introducing reading out XMP tags.
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730994)
 * Knut,
 * I have re-posted your good news to the topic it belongs in:
 * [XMP extraction from JPG](https://wordpress.org/support/topic/xmp-extraction-from-jpg?replies=11#post-6976221)
 * Thanks for your update.
 *  [webHorse16](https://wordpress.org/support/users/webhorse16/)
 * (@webhorse16)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730996)
 * Hi David!
 * I could use your help on this topic. We would like to have something like the
   alphabets menu and alphabetized adjacent posts like you see here: [http://www.bushcraftvereniging.nl/wiki/bannock-2/](http://www.bushcraftvereniging.nl/wiki/bannock-2/)
 * Specifically, I’m referring to the alphabetical post menu and the previous/next
   post links by alphabet. I’d like to use this at [http://www.SpaceStudent.org/companies](http://www.SpaceStudent.org/companies)
   which is basically an Industry Directory. Please keep in mind that the issues
   listed above, like avoiding alphabetizing based on articles (like “the”, and “
   an”) do not apply here because we’re only working with company nanes.
 * As we expand the Industry Directory, we would also like to do things like list
   all the news posts related to a company below the company description section
   of the single post.
 * If you look at one of the single company pages, you will see that there are a
   number of other issues… like the fax field label and the social media icons display,
   even if no content for these fields has been entered in the admin. There could
   be like a checkbox to display the icon or not, or better, it could simply be 
   aware if the field was empty and not show the icon/label if there’s not any data
   there.
 * BTW, we asked the current developer to use the Pods Admin framework, which we
   are happy with because later we can easily add fields, etc. into the custom posts…
   but I mention it because, if you’re going to do some work for us, you may need
   to work within that framework. It’s not dealbreaker… just wanted you to be aware.
 * SO, take a look and let us know if you’re able and interested to help… and how
   you like to structure work with newbie clients like us.
 * All the best! dd
 *  Plugin Author [David Lingren](https://wordpress.org/support/users/dglingren/)
 * (@dglingren)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730997)
 * [@webhorse16](https://wordpress.org/support/users/webhorse16/),
 * Thanks for your query, the site links and the details on your application needs.
   I am not sure why you added them to this topic instead of starting a new topic
   with a more specific title.
 * I have read your description and looked at the sites you gave links to. I believe
   I understand what you want, but I do not see how the Media Library Assistant 
   plugin can help you. The first part of your application, “**_ alphabetical post
   menu and the previous/next post links by alphabet_**“, reminds me of this earlier
   MLA support topic:
 * [Alphabetical pagination](https://wordpress.org/support/topic/alphabetical-pagination-2)
 * Conditional display of elements like your icon/label can be done in the context
   of an `[mla_gallery]` shortcode using Content Templates, as in this earlier topic:
 * [Camera Exif Fetch](https://wordpress.org/support/topic/camera-exif-fetch)
 * However, these topics and techniques work in the context of Media Library items
   such as images because, well, that is the purpose and scope of Media Library 
   Assistant. It looks like your application questions are regarding posts, pages
   and custom post types. If I understand that correctly, I am not sure how MLA 
   can help.
 * I hope you will appreciate that developing MLA and supporting its users is a 
   full-time (volunteer) job. I do not have the time required to take on general
   WordPress development tasks or projects. If MLA can be of use to your application
   I am happy to help you make it a success. If not, I thank you for your interest
   and wish you complete success with your project.
 *  [webHorse16](https://wordpress.org/support/users/webhorse16/)
 * (@webhorse16)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730998)
 * Thank you David! I appreciate your feedback and totally understand about your
   dedication to MLA and the associated time constraints. Yes, you’re right… I found
   the alphabetical pagination link in doing a general wordpress search for help
   on my interests. Again, thank you for taking a look and of course, when/if the
   general goals of MLA are more in line with our needs, I’ll be in touch. Thank
   you again! dd

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘MLA errors when using plugin’ is closed to new replies.

 * ![](https://ps.w.org/media-library-assistant/assets/icon-256x256.png?rev=973502)
 * [Media Library Assistant](https://wordpress.org/plugins/media-library-assistant/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-library-assistant/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-library-assistant/)
 * [Active Topics](https://wordpress.org/support/plugin/media-library-assistant/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-library-assistant/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-library-assistant/reviews/)

 * 11 replies
 * 4 participants
 * Last reply from: [webHorse16](https://wordpress.org/support/users/webhorse16/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/mla-errors-when-using-plugin/#post-5730998)
 * Status: resolved