Support » Plugin: Media Library Assistant » Some images don’t show in “Add Media” after deactivating MLA

    • MLA 2.83 with the default settings on WP 4.5.1
    • The only thing I did in MLA when it was installed was to change the date of all images in my media library.
    • I have reactivated the default TwentySeventeen theme (latestversion) and deactivated all plugins (except Coming Soon…), but the issue is still happening.

    I installed MLA to try it out but decided it was too much for my needs and deactivated it after a day or so.

    Since deactivating it, not all images appear when I try to add an image to a page or post, even though they are all still in the Media Library. When I reactivate MLA, they appear again as expected.

    For example, I have 94 images in my library, all of which show up as “Mine” in the Media Library some are attached, some are unattached. If I try to set a featured image, only 40 show in the Add Media window. If I change the Filter from the default “Images” to “Mine” I get 41 (even though all images are mine). If I change the filter to “Unattached”, I get 69 (there are 73 unattached images in the media library).

    When I reactivate MLA, I get 90 in “Images” and 69 in “Unattached”.

    The 40 images that appear were all on the site pre-2020, the rest were added in the last week – some when MLA was installed, some before it was installed.

    Is there any way MLA could be caching something and thats why I keep getting the same 40 images? I don’t have any caching plugin or on the hosting server as this is just a development environment.
    Can you give any guidance on what is happening or what I could do to debug the issue? I’m at a total loss! Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • ADDITIONAL INFORMATION: The issues seems to be to do with “Enable Media Manager Enhancements”

    “Enable Media Manager Enhancements” must be checked in the settings for the Add Media window to work properly.
    If it is unchecked, only some images appear in the “Add Media” window. When it is checked, they all appear.

    I’ve tried all the other settings and this is the only one that seems to affect the issue.
    Why is this happening and how can it be resolved?

    Plugin Author David Lingren

    (@dglingren)

    Thanks for trying MLA and for your report. I regret the trouble you are having with the “missing” images in the Media Manager Modal (popup) Window. Thanks as well for your update with the additional information.

    You asked “Is there any way MLA could be caching something and thats why I keep getting the same 40 images?” The short answer is no, MLA does not cache anything or affect the storage of items in the Media Library.

    You wrote “The only thing I did in MLA when it was installed was to change the date of all images in my media library.” You don’t say what new value(s) you changed the dates to, but this seems a likely clue. If you tell me the steps you followed to make those changes I can try to reproduce your issue on my system. I assume you are referring to the “Uploaded on:” date on the Media/Edit Media screen; is that right?

    You wrote “not all images appear when I try to add an image to a page or post, even though they are all still in the Media Library.” I understand that to mean that the items appear in the WordPress Media/Library admin screen, but not in the Add Media popup window; is that right?

    The Add Media popup window, Media/Library screen, MLA’s Media/Assistant screen and MLA’s “enhanced Add Media popup window” all use different database queries, and it’s possible that altering the date(s) has introduced a problem. Your experiment with the “Enable Media Manager Enhancements” checkbox suggests that some query difference is involved. Great detective work!

    One thing you could try is to find one or more of the missing items and restoring their original dates or changing their date to the same value as some other, unaffected item.

    You could also try using the date dropdown control to filter the items. Change it from “All dates” to a month/year that includes the missing items and see if they show up.

    In any case, I will try to reproduce your issue on my system. If you can tell me more about your date modifications it might be useful. Thanks for any additional information you can provide, and for your patience.

    Thanks for your detailed reply and sorry for the delay in replying, we needed to get the site live so I just left the plugin installed in the end.

    To answer your questions:
    Changing the date on my images: Yes, it was the Upload date that I changed. I went into MLA, selected all the images and changed all the images in one go. They were all given the same date which was in the previous month.

    “the items appear in the WordPress Media/Library admin screen, but not in the Add Media popup window; is that right” Yes, that is right.

    Try restoring their original dates I did change them back to the current date, which was the original date for some of the photos but not all. I couldn’t remember the original date for all of them 🙂

    Change it from “All dates” to a month/year that includes the missing items I can’t try this out right now, but I know I tried this at the time and took note of all my results, but I didn’t mention it in my original post so I assume I must have got the same number of results as unfiltered.

    Sorry that’s probably not very helpful! You mention the various screens all use different database queries… would it help if I was to output these queries to the screen so you can compare? The dev site is down now but I can resurrect it if it would help. If could you let me know where to add the code to echo them, I’m a developer myself so I’d be comfortable enough with the code (and if I break anything its only the dev site).
    No rush on this as the site is live now with MLA, but it’d be great if I could figure it out at some stage. Thanks!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your response with the additional information and answers to my questions. Before I investigate further and try to give you a way to display the queries I want to confirm that you are using a very old WordPress version, WP 4.5.1. Is there some reason you haven’t updated to the current or at least a more recent version?

    I have set up a WP 4.5.1 test site and I discovered that it won’t even run with the current PHP version (7.4.x).

    Do you have access to the error log for your site? It’s easier to write debug information to the log and extract it later.

    I’m so sorry!!! That was a typo, I’m actually using the latest version 5.4.1. Sorry to have put you through the hassle of installing the test site for nothing.
    Yes, I have full access to the hosting and control panel, so I can access the error logs or anything else that might help.
    And sorry again for the typo 🙁

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the clarification; no problem about the typo.

    I have uploaded a new MLA Development Version dated 20200621 that adds some debug logging for the “query-attachments” action used to populate the Set Featured Image popup window. You can find step-by-step instructions for using the Development Version in this earlier topic:

    PHP Warning on media upload with Polylang

    Once the Development Version is installed you can activate the debug logging:

    • Navigate to the Settings/Media Library Assistant Debug tab.
    • Scroll down to the “MLA Reporting” text box and enter “0x100”. This will turn on MLA debug logging for “query-attachments” Processing.
    • Click the Save Changes button to record your new setting.
    • Optionally, scroll to the bottom of the screen and click “Reset” to clear the error log. You may not want to do this depending on how you manage your error log.

    Once that’s done you can re-run one or more Set Featured Image tests, with and without MLA enhancements. Then, go back to the Debug screen and:

    • Enter “0” in the MLA Reporting text box to turn debug logic off.
    • Click the Save Changes button to record your new setting.
    • Scroll to the bottom and click “Download” to get the log content in a text file.

    You can post the results here or contact me at my web site to get instructions on sending the log file information.

    Thanks for your patience and for any further information you can provide.

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