Open barrett-rob opened 8 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",
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
Any update on that? Tnx
@barrett-rob @red-made I suggest you use patch-package. Changes are based from @abhishek1020N.
node_modules > strapi-plugin-import-export-entries > admin > src > hooks > useSlug.js
npx patch-package strapi-plugin-import-export-entries
A new dir and file should be created automatically calledpatches/strapi-plugin-import-export-entries+1.23.1.patch
. Should look something like so:
diff --git a/node_modules/strapi-plugin-import-export-entries/admin/src/hooks/useSlug.js b/node_modules/strapi-plugin-import-export-entries/admin/src/hooks/useSlug.js
index 3d206c9..24d3866 100644
--- a/node_modules/strapi-plugin-import-export-entries/admin/src/hooks/useSlug.js
+++ b/node_modules/strapi-plugin-import-export-entries/admin/src/hooks/useSlug.js
@@ -7,7 +7,7 @@ export const useSlug = () => {
const { pathname } = useLocation();
const slug = useMemo(() => {
yarn install
- our changes will be appliedyarn add patch-package postinstall-postinstall
"scripts": {
...
"postinstall": "patch-package"
}
rm -rf node_modules
yarn install
yarn build && yarn start
Any official fix?
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
Describe the bug
When I click export for a collection it always defaults to "Whole database"
To Reproduce Steps to reproduce the behavior:
Expected behavior
I should be able to export only the selected collection.
Screenshots