CSV Import

This topic contains 7 replies, has 2 voices, and was last updated by  Hui Ling Tan 4 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #522378

    Hui Ling Tan
    Expired Member
    Post count: 349

    Hi,

    I get an error when trying to import CSV files. I followed the documentation https://wpgeodirectory.com/docs-v2/geodirectory/settings/import-export/#not-a-valid-csv-file and used

    function wp39550_disable_real_mime_check( $data, $file, $filename, $mimes ) {
    $wp_filetype = wp_check_filetype( $filename, $mimes );
    
    $ext = $wp_filetype[‘ext’];
    $type = $wp_filetype[‘type’];
    $proper_filename = $data[‘proper_filename’];
    
    return compact( ‘ext’, ‘type’, ‘proper_filename’ );
    }
    add_filter( ‘wp_check_filetype_and_ext’, ‘wp39550_disable_real_mime_check’, 10, 4 );

    in my code snippets but still get the error msg Array( [error] => Sorry, this file type is not permitted for security reasons.)

    I didn’t use https://wordpress.org/plugins/disable-real-mime-check/ because it states that”this plugin… may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.”

    #522379

    Hui Ling Tan
    Expired Member
    Post count: 349
    This reply has been marked as private.
    #522420

    Alex Rollin
    Moderator
    Post count: 27815

    Please try the plugin, it is fine to use. This is a WP error, you can review the links attached to the help doc.

    #522771

    Hui Ling Tan
    Expired Member
    Post count: 349
    This reply has been marked as private.
    #522792

    Alex Rollin
    Moderator
    Post count: 27815

    The snippet is included in the plugin.

    #522869

    Hui Ling Tan
    Expired Member
    Post count: 349

    Hi,

    I installed the plugin and got a fatal error when I tried to activate it.

    #522881

    Alex Rollin
    Moderator
    Post count: 27815

    The plugin has the same snippet. Disable the snippet, then add the plugin. You only need one or the other.

    #526337

    Hui Ling Tan
    Expired Member
    Post count: 349

    It works now. Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount