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 forces Whole Database when a collection is selected & open #185

Open barrett-rob opened 5 months ago

barrett-rob commented 5 months ago

Describe the bug

When I click export for a collection it always defaults to "Whole database"

To Reproduce Steps to reproduce the behavior:

  1. Click on "Content Manager" on the LHS
  2. Click on a collection
  3. Click the "Export" button
  4. Observe that the dialog/modal shows "Whole database"

Expected behavior

I should be able to export only the selected collection.

Screenshots

image
barrett-rob commented 5 months ago

Sorry! I should add this is for the following versions:

    "@strapi/strapi": "4.17.0",
    "strapi-plugin-import-export-entries": "^1.23.1",
abhishek1020N commented 5 months ago

The issue is due to the change in the strapi cms url path. The error arises inside the hook useSlug. Here the value of the slug is set based on the regex with const matches = pathname.match(/content-manager\/(collectionType|singleType)\/([a-zA-Z0-9\-:_.]*)/); However in the latest strapi version post 4.16, the match should be done with const matches = pathname.match(/content-manager\/(collection-types|single-types)\/([a-zA-Z0-9\-:_.]*)/);.

Hope this helps and we recieve the new version sooner. @Baboo7

red-made commented 4 months ago

Any update on that? Tnx

KantapongC commented 2 months ago

@barrett-rob @red-made I suggest you use patch-package. Changes are based from @abhishek1020N.

1. Make an edit to the node_modules

2. Make changes persist in the project

3. Install patch-package: So that when yarn install - our changes will be applied

4. (Optional) Ensure that our changes applied

bhavyabhut commented 1 month ago

Any official fix?

CodeDruid13 commented 3 weeks ago

Any official fix?

The steps given by @KantapongC works perfectly. There have been multiple PR's done to fix the issue but the dev has been unavailable