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

    (@dglingren)

    Thanks for your report; I regret the trouble you are having with XLSM uploads.

    I just ran some quick tests and I have no trouble uploading XLSM files with or without MLA enabled. I believe they are allowed by the default WordPress configuration.

    If, however, you are in a multi-site environment they are not allowed. You can find more information in the “File Extension and MIME Type Processing” section of the Settings/Media Library Assistant Documentation tab, which includes:

    The list is also used in /wp-includes/ms-functions.php, function check_upload_mimes(), which “is used to filter that list against the filetype whitelist provided by Multisite Super Admins at /wp-admin/network/settings.php.” Multisite installs must respect this restriction, so any list we produce will be passed thru that function if it exists.

    If you are not in a multisite environment and are still having trouble, navigate to the Settings/Media Library Assistant Uploads tab, search for XLSM and make sure it is set to “active”. If that doesn’t help, let me know the steps you are using to upload the files and I will investigate further. Thanks for your understanding and your interest in the plugin.

    Thread Starter mawill13

    (@mawill13)

    There are multiple sites on my server (vm) but I am not using a multi-site setup. Currently, the mime type is set to active.

    Link to video

    I am using drag and drop to add the file to Media and I get the message:

    “Mileage-Calculator2019.xlsm” has failed to upload.
    Sorry, this file type is not permitted for security reasons.

    Link to video

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update and the link to your screen shots; very helpful. It looks like you are doing everything right.

    For a brute-force workaround you can try disabling WordPress’ type checking as described in this Codex article:

    Roles and Capabilities, Special Cases (unfiltered_upload)

    If you can access your site’s error log you can try activating MLA’s debug logging:

    1. Navigate to the Settings/Media Library Assistant Debug tab.
    2. Scroll down to the “MLA Reporting” text box and enter “129”. This will turn on MLA debug logging for MIME Type Processing.
    3. Click the Save Changes button to record your new setting.
    4. 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 run one or more Upload tests. Then, go back to the Debug screen and:

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

    There might be a lot of messages written to the log, so limit the amount of activity during the logging period. You should see messages in the log like these:

    
    [22-Jan-2018 19:47:05 UTC] 591 MLACore::mla_plugins_loaded_action() MLA 2.70 (20180115) mla_debug_level 0x3
    

    You can post the interesting messages in this topic. You can also email me the information if that’s better for you. You can contact me at my web site to continue the dialog.

    Thanks for your patience.

    Thread Starter mawill13

    (@mawill13)

    Nothing is displaying in the log.

    Link to video

    FYI – All my WP sites are self hosted so I have full access to everything. I should also note that this issue started when I upgraded to WP 5.x. I am experiencing this issue on other sites that I test on but I really only need to upload XLSM files to one site – at least for now.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for trying to activate the debug logging. The settings look good; I’m not sure why MLA can’t write its messages to the existing log.

    You can try creating an MLA-specific log file by entering enter something like “/uploads/mla.log” in the “Debug File” text box (and saving your changes).

    You can also try another experiment. Navigate to the Settings/Media Library Assistant Uploads tab and uncheck the box to the left of “Enable Upload MIME Type Support” to take MLA out of the loop. Run your upload test to see if WordPress will allow XLSM uploads without MLA’s involvement.

    Let me know if that helps. Thanks!

    Thread Starter mawill13

    (@mawill13)

    I know it doesn’t work even with MLA out of the loop as I was using Enhanced Media Library and it wasn’t working. I uninstalled EML and it still didn’t work. I then installed MLA since it works with WP 5.x and it I still can’t get it to work.

    I do not think it is a plugin issue and I am beginning to wonder if it is a WP issue or something in the way my server is setup.

    In any case since I am the one who uploads 99% of the files I am willing to add:

    define( ‘ALLOW_UNFILTERED_UPLOADS’, true );

    However, after reading the article I am unclear where to add the line. Any help would be appreciated.

    Plugin Author David Lingren

    (@dglingren)

    I appreciate the additional information about your setup and plugin configurations.

    If you can get the MLA logging to work I might be able to shed more light on the situation. I am happy to continue the dialog by email if that’s more convenient.

    Regarding ALLOW_UNFILTERED_UPLOADS, you can add the define statement to your wp-config.php file. You can also try adding other statements such as define( 'WP_DEBUG', true ); to the file so more information is logged.

    I hope the brute force workaround gives you some relief. Let me know how it goes.

    Thread Starter mawill13

    (@mawill13)

    So, after enabling WP_DEBUG, I am seeing no errors. I suspect that I see no errors because it doesn’t see this issue as an error.

    For giggles I tried a few debug plugins but still found no errors.

    However the define( ‘ALLOW_UNFILTERED_UPLOADS’, true ); works as need so for now I am sticking with it.

    New question: As I noted before I have been using Enhanced Media Library for a few years but it appears that it is no longer being updated. I really like what I see in your plugin but I do not want to recreate all of my attachment categories and reassign the attachments. Is there a way I can migrate to your plugin but retain the EML settings?

    Plugin Author David Lingren

    (@dglingren)

    Thanks for the good news that the ALLOW_UNFILTERED_UPLOADS setting works for you. Note that this is a global setting, so any logged in user will get that privilege.

    I’m not surprised that there are no “errors” showing in the log; as you wrote, it’s not exactly an error situation. The MLA logging is more of a debug trace tool and should be writing messages showing the details of uploads whether or not they cause actual errors. It might give some clues on the trouble you’re having.

    You wrote “Is there a way I can migrate to your plugin but retain the EML settings?” There is some information on adding support for the EML categories in this earlier topic:

    Front-end filtering not working out

    You could either replace the MLA Att. Categories taxonomy with the EML Media Categories taxonomy or you could map your items’ terms from one taxonomy to the other. The latter might be more complex if you have a hierarchy structure in your existing terms.

    I am marking this topic resolved because MLA is working properly and you have found a solution for your immediate problem, but please update it or start another topic if you have problems or further questions regarding the above suggestions.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘XLSM Mime Type Issue’ is closed to new replies.