Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

No Items imported! #30

Open
vyasjigsm opened this issue Aug 3, 2021 · 4 comments
Open

No Items imported! #30

vyasjigsm opened this issue Aug 3, 2021 · 4 comments

Comments

@vyasjigsm
Copy link

When I was trying to import one complex model with some json fields, It is saying me like No Items Imported! and also not showing any errors why its not importing or anything.

@EdisonPeM
Copy link
Owner

hi @vyasjigsm, verify that the values you want to enter are in the correct format and do not have missing values that are marked as required.

Additionally, the server console should show if there is an error uploading the data to the database.

@vyasjigsm
Copy link
Author

vyasjigsm commented Aug 4, 2021 via email

@easydrops
Copy link

hi @vyasjigsm, verify that the values you want to enter are in the correct format and do not have missing values that are marked as required.

Additionally, the server console should show if there is an error uploading the data to the database.

I had a similar issue. In my case it was also due to the format: The value to import was set as a number (a numeric value without quotes in the csv) and the field in strapi was a string. I had to change the field in strapi to a number to make it work.
For this case, it would be great to have a more specific error message than 'No Items Imported' :)
Thanks for the work on this plugin!

@wellspun
Copy link

wellspun commented Nov 5, 2021

@EdisonPeM We are having this issue, as well. The field in Strapi is a String but sometimes the information in the field is purely numeric (think a room number in a building, sometimes it's W101 to indicate the west room 101 and sometimes it's just 101 as there's only one in the building.
Is there a way you can think of to support this use case for importing? I've looked through the code, coming to services/contentParser/csvParser.js and am trying to think of a method to ensure proper mutation into a string for the data received, but it seems like the data is already stripped of quotes by the time it gets here, so will always convert string numbers into a Number.
A better solution would be for the Strapi back-end to automatically coerce a Number into a String type when trying to import. Is there an option we can set for the strapi.entityService.create call at services/importer/importUtils.js:3?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants