WordPress.org

Support

Support » Plugins and Hacks » Media Library Assistant » [Resolved] Warning Message – class-mla-data.php on line 1398

[Resolved] Warning Message – class-mla-data.php on line 1398

  • I was using the plugin with no problem, then this error message appeared now when I went to the dashboard/media->assistant menu to bulk edit images – above the list of the images were 2 repetitions of this error –

    Warning: Invalid argument supplied for foreach() in /home/amyro/public_html/——.com/2013customsite/wp-content/plugins/media-library-assistant/includes/class-mla-data.php on line 1398

    I did edit a few images then and then a series of these errors appeared – 1 for each image that I edited.

    Before requesting help I chkd to see that the site (since it is in development) is set to false for the debug mode, I also deactivated and deleted all the files and reinstalled it as well 2x 1 through the wordpress plugin area and 1 through cpanel but still the error appears

    http://wordpress.org/extend/plugins/media-library-assistant/

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

    @dglingren

    Thanks for this report and for taking the time to check out debug mode and re-install the plugin. The warning message and line number information is particularly helpful. I am sorry this is giving you trouble.

    The message comes from a function that is building the “where-used” information (“Gallery in” and “MLA Gallery in”) for the Media/Assistant table listing. It looks like one of your [gallery] or [mla_gallery] shortcodes is returning an error instead of an array of attachments. The current version of MLA does not handle this error properly, causing the warning messages. I will fix that in the next version.

    In the interim, you can try a few things to correct the problem or at least suppress the messages. First, have you added or changed any [gallery] or [mla_gallery] shortcodes that might not be working properly? Are the galleries displaying what you expect?

    Second, you can go to the Settings/Media Library Assistant screen and change the “Where-used Reporting” options. Try setting the “Gallery in” option to “Disabled” and see if the problem goes away. If so, the [gallery] shortcode is causing trouble. If not, try changing the “MLA Gallery in” option. If that suppresses the messages, [mla_gallery] is the culprit.

    There might be some other defect in the MLA plugin that’s causing this problem, even if your shortcodes are working fine. If you want it, I can fix the code and send you a copy that more clearly identifies the source of the problem. If that would help, send me your e-mail address; go to the “Contact Us” page at our web site:

    Fair Trade Judaica/Contact Us

    Let me know what you’d like to do. Thanks again for your interest and for bringing this issue to my attention.

    Thanks for your swift reply. As recommended I changed the setting “Gallery in” option to “Disabled” and they disappeared. Now it all works well.

    Plugin Author David Lingren

    @dglingren

    You’re welcome. I’m happy that disabling the “Gallery in” option suppressed the warnings. Remember, though, that the warning messages appeared because one or more of your [gallery] shortcodes contains invalid parameters. You should review your pasts and pages to make sure the gallery displays are what you expect.

    As I said earlier, I can send you a version of the plugin that more clearly identifies the post/page and [gallery] causing the problem if you are interested.

    Plugin Author David Lingren

    @dglingren

    I have released version 1.40, which should give you more specific reporting on shortcode problems. When you’re ready, upgrade to that version, re-enable the “Gallery in” option and let me know what it tells you.

    I want to make sure that whatever error(s) MLA is detecting are actual shortcode errors and not some other issue. Thanks for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Warning Message – class-mla-data.php on line 1398’ is closed to new replies.
Skip to toolbar