• Resolved srweisb

    (@srweisb)


    There’a number of posts here (including mine) about problems opening attachments in AOL.

    Until the author fixes this (a deprecated function is being called) I’ve identified this workaround:

    This is a simple workaround, but you’re doing this at your own risk. Make a backup backup copy of the file being edited before you make any changes.

    1. Locate the plugin file …(yourwebsite)/plugins/apply-online/admin/class-applyonline-admin.php

    2. Find the line that contains this text:
    $mime_type = mime_content_type($path);
    This will be near line 540-550 and in the function “output_attachment()”

    3. Add two slashes in front of it to comment it out:
    // $mime_type = mime_content_type($path);

    4. Add a new line after it:
    $mime_type = ‘application/octet-stream’;

    Note that this is a workaround, and forces the mime-type to the generic “application/octet-stream” which will probably be fine for most common attachments you’ll encounter here. Some attachment types may not open the same as they did with the working mime_content_type in some browsers, but most should open.

    • This topic was modified 7 years ago by srweisb.
    • This topic was modified 7 years ago by srweisb.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Farhan Noor

    (@farhannoor)

    Hi,
    Thank you for your effort for WP community to fix plugin issue. I really appreciate it. How about wp_check_filetype function? mime_content_type() function was marked deprecated in some php versions but it is now onboard again. So people using php version 5.5.* may have trouble with it. WordPress also recommends to have latest version of PHP installed on your web server to avoid conflicts & problems. Here is the link https://ww.wp.xz.cn/support/update-php/

    We have updated Development Version, Give it a try: https://downloads.wp.xz.cn/plugin/apply-online.zip

    Best Regards.

    DLM1166

    (@dlm1166)

    @srweisb Thank you very much for your time and clear instructions. It now works. Also, I did search on this issue, particularly on the word ‘attachment’ but only a few posts were returned and they did not address my issue. I don’t know why your past post was not returned.

    @farhannoor We have been using php v.7.2.7

    • This reply was modified 7 years ago by DLM1166.
    Plugin Author Farhan Noor

    (@farhannoor)

    Hi DLM1166,
    Did you try development version of the plugin? It provided an alternate to the function which seems problematic.

    Plugin Author Farhan Noor

    (@farhannoor)

    This workaround has been fixed in the latest version. Thank you.

    Thread Starter srweisb

    (@srweisb)

    Thank you Farhan, I confirmed it’s fixed in 1.9.94 and the workaround is no longer needed.

    Plugin Author Farhan Noor

    (@farhannoor)

    That is Great srweisb. Dont forget to write your review for the plugin at https://ww.wp.xz.cn/support/plugin/apply-online/reviews/

    Best Regards.

    DLM1166

    (@dlm1166)

    @farhannoor @srweisb

    I did update to the latest version and it fixed the problem. Thank you both very much for your help!

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

The topic ‘Workaround for attachment opening issues’ is closed to new replies.