Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0.0 Clone works only once per campaign name #1725

Closed
setiseta opened this issue Feb 12, 2024 · 12 comments
Closed

v3.0.0 Clone works only once per campaign name #1725

setiseta opened this issue Feb 12, 2024 · 12 comments
Assignees

Comments

@setiseta
Copy link

Version:

  • listmonk: v3.0.0
  • OS: Ubuntu 22.04 (but docker deployment)

Description of the bug and steps to reproduce:
create a campaign and try to clone it two times.

  • Create a campaign, with name "test1"
  • clone campaign "test1" and rename it
  • clone campaign "test1"

Screenshots:
If applicable, add screenshots to help explain your problem.

Log:
2024/02/12 09:40:30 campaigns.go:197: error creating campaign: pq: duplicate key value violates unique constraint "campaigns_archive_slug_key"

@orthdron
Copy link

Not maintainer but I looked into it and the new Version 3.0 adds slug by default and hence it can't be cloned. No issues if you clone old campaigns.

@root-io
Copy link

root-io commented Feb 14, 2024

I had the same issue cloning a deleted campaign:

record.mp4

@elrumordelaluz
Copy link

Same here.

@knadh knadh self-assigned this Mar 12, 2024
@knadh knadh closed this as completed in 107e6fb Mar 12, 2024
@elrumordelaluz
Copy link

thank you @knadh! will this be added in a new version?

@Codinator007
Copy link

sorry for asking maybe a dump question... All issues seems closed for this topic but it still exists.
Will this issue be fixed in the next version or is there a chance to solve it earlier?
thank you :)

@PackMeister
Copy link

I'm unable to clone an old campaign as well.
Tried bouncing listmonk server but when re-attempting to clone old campaign to edit for new campaign I get following:

error creating campaign: pq: duplicate key value violates unique constraint "campaigns_archive_slug_key"

@m3nu
Copy link
Contributor

m3nu commented Sep 9, 2024

Getting this error too. My solution was to set the campaigns.archive_slug to NULL before cloning the old campaign. Most of my campaigns already had NULL. Hope this doesn't break something else.

@nkosi23
Copy link

nkosi23 commented Sep 12, 2024

Have been hitting this as well since upgrading, and I have a clone-heavy workflow so life is a misery. Would really appreciate a new release with all the bug fixes.

@muammaramer
Copy link

same issue here! can we re-open this?

@momu
Copy link

momu commented Sep 26, 2024

My solution was to set the campaigns.archive_slug to NULL before cloning the old campaign. Most of my campaigns already had NULL

@m3nu How did you do it?

@serge005
Copy link

serge005 commented Oct 4, 2024

@momu I'm assuming he modified the data in the database.

@momu
Copy link

momu commented Oct 17, 2024

Just for reference:

alter table campaigns drop constraint campaigns_archive_slug_key; fixed it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests