strapi-plugin-import-export-content
strapi-plugin-import-export-content copied to clipboard
[Solved] No Items Imported
I've came across this error message when importing a csv file: No Items Imported.
As this does not provide any feedback on what's going wrong in the import process, I had to investigate by myself. What did expose the errors that were happening was the console.error in this file:
node_modules/strapi-plugin-import-export-content/services/importer/importUtils.js
const importToCollectionType = async (uid, item) => {
try {
await strapi.entityService.create({ data: item }, { model: uid });
// await strapi.query(uid).create(item);
return true;
} catch (error) {
console.error({e: error.data.errors})
return false;
}
};
Hope this helps anyone having the same issue. Wish y`all the best.