• Hi, i always update my stock every sunday via CSV import, and now it happens that i import a CSV file to woocommerce, for security reasons, it shows: “Sorry, this type of file is not allowed for security reasons.”

    I disabled all plugins, but still.

    I am checking with QUIC Cloud, here i have my caché, maybe it has something to do with it.

    Do you why this could happen?
    There is a method to allow CSV files, without modifying wp-config.php ?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @avagp,

    The error message “Sorry this file type is not allowed for security reasons” you receive when importing the WooCommerce CSV file could have as a possible reason your WordPress software not updated to the latest version 5.7.2.

    If WordPress is up to date then you can try some workarounds:

    https://woocommerce-manager.com/useful-articles/how-tos/fix-woocommerce-import-error-sorry-this-file-type-is-not-permitted-for-security-reasons/

    Cheers.

    Thread Starter Radical Dreamer

    (@avagp)

    i can upload certain products.

    For example, certain categories do upload normally, but other don’t.

    Thread Starter Radical Dreamer

    (@avagp)

    Also, i have the las version 5.7.2

    Thread Starter Radical Dreamer

    (@avagp)

    i tried all. To upload to FTP and disallow on the wp-config.php does work.

    But are temporary solutions. It let my site vulnerable.

    Disable MIME Type Checking on functions.php does not work.

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi @avagp 👋

    “Sorry, this type of file is not allowed for security reasons.”

    This error means that there are some specific HTML tags within your .CSV file that triggers this error.

    It is not allowed on WordPress and on the WooCommerce importing products functionality to import some HTML tags for security reasons. But as mentioned, a workaround for this, to allow the majority of the HTML tags, is to add the following line to your wp-config.php file:

    define( 'ALLOW_UNFILTERED_UPLOADS', true );

    Just so you know, this restriction comes from the WordPress core itself.

    The reason behind these restrictions is to prevent security issues due to file uploading vulnerabilities. The accidental or purposeful upload of malicious executable files could do permanent damage to your site. Others can give hackers access to your site or your server.

    If you would like to read more about this, please feel free to visit the following link:

    https://docs.woocommerce.com/document/product-csv-importer-exporter/#section-14

    I hope that helps. 🙂

    Thread Starter Radical Dreamer

    (@avagp)

    Thank you Gabriel. 🙂

    I thought that could be the case, because some items can be totally uploaded.

    But what really bugs me is the fact that products only have html based on Gutenberg. So is the same wordpress indicating that their html blocks might be harmful?

    :/

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Happy to help! 🙂

    Well, yes, it seems that it would not let any HTML element be imported to a site without using the workaround mentioned previously.

    Cheers!

    Thread Starter Radical Dreamer

    (@avagp)

    It’s kinda odd, because every product description has HTML.

    So it will be impossible, but that is not the case

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

The topic ‘Suddenly can’t import CSV files’ is closed to new replies.