Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Throwing error while importing the json file #2

Open
maruthasalamr opened this issue Jan 9, 2025 · 7 comments
Open

[Bug] Throwing error while importing the json file #2

maruthasalamr opened this issue Jan 9, 2025 · 7 comments

Comments

@maruthasalamr
Copy link

Bug report while importing the json file - Missing message: strapi-import-export.plugin.form.field.id-field.placeholder for locale en , using id as fallback.

Node Version - v18.20.2
Strapi version - 5.0.0
strapi-import-export - 0.0.1
Database - PostgresSQL
Operation system - Mac Os

image
@Moonlight63
Copy link

I also got this one. It doesn't really matter because its just saying that the localization string is missing from the translation files, but I did fix it in my fork when I added the new export format. You can install it if you want: https://www.npmjs.com/package/strapi-import-export-v3?activeTab=readme

@gorgsenegger
Copy link

Apart from the error message that I also receive, the import just doesn't work in v5.8.0 - no error message in the UI or console though, so I don't know what the problem is.

@Moonlight63
Copy link

Apart from the error message that I also receive, the import just doesn't work in v5.8.0 - no error message in the UI or console though, so I don't know what the problem is.

I know it sounds stupid, but does the data show up if you refresh the page? This is something I found even in my new version, that after the data imports even though we tell the list to refresh, the new data doesn't show up until the full page is refreshed. I haven't figured out why yet.

@gorgsenegger
Copy link

I know it sounds stupid, but does the data show up if you refresh the page? This is something I found even in my new version, that after the data imports even though we tell the list to refresh, the new data doesn't show up until the full page is refreshed. I haven't figured out why yet.

Thanks for the suggestion, unfortunately that didn't work for me :-/

Did you update with a file or did you paste the file contents by selecting "Code Editor" after pressing the import button? Do you have an example of what your json (if used) looks like? I tried updating a single entry in one of my collections, so nothing too complicated.

@Moonlight63
Copy link

I typically used the code editor and pasted in but I did try the file selector a few times just to make sure it works. I should clarify that I haven't tried this version of the plugin on 5.8, only my v3 fork, which has a completely different json structure. I've been testing it for a bit making sure its good before submitting a pull request, but it hasn't given me many issues so far except for localizations aren't working great, but that has more to do with the way strapi works than anything. Ill submit a pull request for it here now, and maybe I can fix localizations in a v4 or something.

@GraemeFulton
Copy link
Member

Hey I'll give this a go too - should get chance either today or early next week!

@Przecza
Copy link

Przecza commented Jan 29, 2025

I have issues with updating during import (by API). Creating is good. There is a wrong ID used In updateOrCreateCollectionTypeEntry function. In update if/else:

return strapi.documents(slug).update({
  documentId: dbEntry.id,
  data: omit(fileEntry, ['id'])
});

should be dbEntry.documentId, not dbEntry.id

Create branch works good enough for me.

Will try to do PR.

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

No branches or pull requests

5 participants