Baboo7 / strapi-plugin-import-export-entries

Import/Export data from and to your database in just few clicks.
175 stars 86 forks source link

[BUG] Export Function Exports Full Database Instead of Specific Collections or Single Types. #166

Open VeckansE opened 7 months ago

VeckansE commented 7 months ago

The export function only exports the full database and not the specific collection-type or single-type

To Reproduce Install strapi v4.17.0

  1. Go to a collection
  2. Click export
  3. Notice that the header says image

This issue appears to stem from a change in the location pathname from. admin/content-manager/collectionType/plugin::users-permissions.user into admin/content-manager/collection-types/plugin::users-permissions.user

and can be fixed by updating.

const matches = pathname.match(/content-manager\/(collectionType|singleType)\/([a-zA-Z0-9\-:_.]*)/);

into

const matches = pathname.match(/content-manager\/(collection-types|single-types)\/([a-zA-Z0-9\-:_.]*)/);

in useSlug

😃

fmann commented 7 months ago

I was having CSV imports fail in Strapi 4.17.0 with an error in the browser:

"error": "Cannot read properties of undefined (reading 'kind')",

And in the console

error: Model custom:db not found

This fix also addresses that issue.

robinpuga commented 3 months ago

This fixed has worked for us with Strapi version 4.24.2... it would be great it this was added to the plugin code.

FYI. We needed to delete the .cache directory and run npm run build to get it to take effect.