Migrating content with strapi built-in function breaks the aliases
Bug report
Describe the bug
When using strapi import / export function to reinstall a strapi instance on another server, the pattern and list is correctly migrated, but every path is actually duplicated to another -0one. the /about path is visible on the list, but on the database, we have /about-0
Steps to reproduce the behavior
- export a strapi backup with
strapi export --file backup - Import in another database / another server with
strapi import backup.tar.gz
Expected behavior
Path association should remain intact
System
- Node.js version: v18.17.0
- NPM version: v9
- Strapi version: Tested on v4.12.7
- Plugin version: beta.10
- Database: mysql
- Operating system: Linux / MacOS
Additional context
Might be related to #51 and/or to #43
Interesting, this might be because lifecycles run during import, causing the paths to be generated an extra time.
I had a similar issue when using the transfer function and another plugin with lifecycles, those lifecycles ran during the transfer.
I think we could resolve this by checking if the path already exists during the lifecycle, although it might not be that easy.
Imo this is a bug with Strapi, I think they should either make it such that some lifecycles can be disabled during import/export or just don't run the lifecycles at all at those times.
Maybe a proper relationship would correct this behavior ?
@Norbz Could you test this again with the latest version?
We now have proper relations and I suspect this issue to have been resolved.
Hi there.
Sorry for the delay. Lost job 4 months ago, now being freelancer. I don't have access anymore to the project where I had the issue, ill try to reproduce with web tool :)
That would be amazing :D
I'm closing this due to inactivity.
@Norbz If you ever run into this issue again feel free to report a new issue!