Closed wojjee closed 12 months ago
Hi @wojjee , unfortunately i can only expose the existing duplicate logic from within strapi so there is no way to change how the actual duplication is handled.
I also have the same problem. Did you find any solution @wojjee?
nope, unfortunately i did not find any solution for this.
On Wed, 31 Jan 2024 at 10:03, sushmavoleti @.***> wrote:
I also have the same problem. Did you find any solution @wojjee https://github.com/wojjee?
— Reply to this email directly, view it on GitHub https://github.com/lautr/strapi-plugin-duplicate-button/issues/21#issuecomment-1918671786, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNZDJ57YGJDOC2O5Q5NFTTYRICFVAVCNFSM6AAAAAA7SQCFSWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYGY3TCNZYGY . You are receiving this because you were mentioned.Message ID: @.***>
I fixed it using by changing vuid in beforeCreate lifecycle hook. if (pageURL.includes("clone")) { const vuid: string = generateVUID(); event.params.data.versionNumber = 1; if (event?.model?.columnToAttribute?.vuid) event.params.data.vuid = vuid; }
HI i think this function is not working with versionning app. Every time im creating new duplicate and publishing it the orginal content record is removed.