• Resolved mgreis

    (@mgreis)


    Hi,

    I received the following from my WP site indicating a “fatal error” in Media Library Assistant. The site appeared to be operating normally and the dashboard was accessible. A week later, I put the pieces together when I discovered that I was no longer able to upload files to the site, and that the error coincided with a failed upload generating the dreaded message

    WordPress: Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page

    As soon as I deactivated MLA, I was once again able to upload items. Any help would be appreciated – I miss having MLA active!

    Howdy!
    
    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
    
    In this case, WordPress caught an error with one of your plugins, Media Library Assistant.
    
    First, visit your website (https://www.greenneedham.org/blog/) and check for any visible issues. Next, visit the page where the error was caught (https://www.greenneedham.org/blog/blog/wp-admin/async-upload.php) and check for any visible issues.
    
    Please contact your host for assistance with investigating this issue further.
    
    If your site appears broken and you can't access your dashboard normally, WordPress now has a special "recovery mode". This lets you safely login to your dashboard and investigate further.
    
    https://www.greenneedham.org/blog/wp-login.php?action=enter_recovery_mode&rm_token=EqKav6g2M1VSSD03KO7iGC&rm_key=klRxe9UCWbXMPUMuydvtty
    
    To keep your site safe, this link will expire in 1 day. Don't worry about that, though: a new link will be emailed to you if the error occurs again after it expires.
    
    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.3.6
    Current theme: Spacious PRO Child (version 1.0.0)
    Current plugin: Media Library Assistant (version 2.94)
    PHP version 7.2.34
    
    Error Details
    =============
    An error of type E_ERROR was caused in line 52 of the file /home/gnc/public_html/blog/wp-content/plugins/media-library-assistant/includes/class-mla-data-office.php. Error message: Uncaught Error: Class 'ZipArchive' not found in /home/gnc/public_html/blog/wp-content/plugins/media-library-assistant/includes/class-mla-data-office.php:52
    Stack trace:
    #0 /home/gnc/public_html/blog/wp-content/plugins/media-library-assistant/includes/class-mla-data.php(3525): MLAOffice::mla_extract_office_metadata('/home/gnc/publi...')
    #1 /home/gnc/public_html/blog/wp-content/plugins/media-library-assistant/includes/class-mla-options.php(1426): MLAData::mla_fetch_attachment_image_metadata(13377)
    #2 /home/gnc/public_html/blog/wp-content/plugins/media-library-assistant/includes/class-mla-options.php(780): MLAOptions::mla_evaluate_iptc_exif_mapping(Object(WP_Post), 'iptc_exif_mappi...', NULL, Array, true)
    #3 /home/gnc/public_html/blog/wp-includes/class-wp-hook.php(288): MLAOptions::mla_update_attachment_metadata_filter(Array, 13377)
    #4 /home/gnc/public_html/blog/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
    #5 /home/gnc/public_html/blog/wp-includes/post.php(5797): apply_filters('wp_update_att
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your report and for including the details of the error you are experiencing; very helpful. The key information in the messages is:

    Class 'ZipArchive' not found
    

    The ZipArchive class is used by MLA to extract metadata from Microsoft Office files. It is also used in many parts of the WordPress core software, and should be present in every WordPress site. I have added some code to MLA to avoid the fatal error, but you would be well served by finding a way to add or restore ZipArchive to your system.

    I have uploaded a new MLA Development Version dated 20210304 that avoids the error. You can find step-by-step instructions for using the Development Version in this support topic:

    PHP Warning on media upload with Polylang

    It would be great if you could install the Development Version and let me know if it works for you. Thanks again for alerting me to this MLA problem.

    Thread Starter mgreis

    (@mgreis)

    David,

    Thanks so much! I will try installing the development version.

    On the ZipArchive class – I have no idea where that would be or why I don’t have it on my system. I have and use ZipArchives, of course, but I haven’t a clue how to go about adding this class to a WP implementation. Can you provide any guidance?

    Thread Starter mgreis

    (@mgreis)

    Hi David,

    I installed the Development version (what a well-thought out and easy to use process!) and ran a quick test by uploading a Word document. Worked like a charm.

    Thank you so much!

    Per my previous post, I do still want to address the underlying issue of the ZipArchive class, once I understand how.

    BTW, reading your explanation, I gather that this error only shows up when an office filetype (.DOCX, .XLSX, etc.) is uploaded. Once it occurred, would it then prevent any file type from being uploaded? I think I noted that behavior, but I’m not certain. Not an issue, just something I noted.

    MLA is an incredibly impressive plug-in. The documentation you provide is outstanding and thorough. I confess to having only scratched the surface of what MLA does; I originally installed it simply to bring some order to an unruly collection of uploaded images. The possibilities are eye-opening. I need to spend more time with it.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the positive MLA feedback and for installing and testing the Development Version. As you noted, the error occurred when Microsoft Office documents were uploaded. In my testing, the problem does not cause the upload to fail, and if the upload is part of a larger multi-file upload the other files in the batch are uploaded as well. MLA operations such as a Bulk Edit “Map IPTC/EXIF metadata” will fail, however.

    You wrote “ I do still want to address the underlying issue of the ZipArchive class, once I understand how.” The ZipArchive class is a module in your PHP installation as described in the PHP Manual. It should be compiled in to your site’s PHP software. I would report the problem to your host company’s tech support people and let them resolve it.

    My investigation revealed that WordPress tests for the presence of ZipArchive and has a fallback alternative if it is not found, using an older “PclZip” open source library. I will see if I can adopt this approach as well to enable metadata extraction when ZipArchive is not present. I will leave this topic unresolved until I complete my investigation.

    Thanks again for helping me test this interim fix.

    Thread Starter mgreis

    (@mgreis)

    David,

    Thanks for the follow up and the information about ZipArchive. That’s exactly what I needed. Once you explained it was a PHP module, I was able to locate and install it from the EasyApache configuration on cPanel.

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA v2.95, which contains the fix for the “ZipArchive not found” defect. After more investigation I decided that adapting WP’s fallback alternative would not be practical.

    I am marking this topic resolved, but please update it if you have any problems or further questions regarding the fix. Thanks for your patience and helping me find and fix this MLA defect.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Plugin causes a fatal error on your site – message’ is closed to new replies.