craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.22k stars 625 forks source link

Craft 3.1.30 breaks duplicating of entries #4485

Closed lukasNo1 closed 5 years ago

lukasNo1 commented 5 years ago

I testet it with 2 different sites.

Duplicating entries on our websites only works until Version 3.1.29. The changes in Version 3.1.30 broke something.

Is this something you can reproduce?

Error Message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '4824-2' for key 'content_elementId_siteId_unq_idx' The SQL being executed was: INSERT INTO content (elementId, siteId, title, field_lead, dateCreated, dateUpdated, uid) VALUES (4824, 2, 'test', 'test', '2019-07-04 11:57:50', '2019-07-04 11:57:50', '070c9f66-2f4c-4caa-9706-5b217d0ac8be')

Additional info

joao-proenca-ef commented 5 years ago

I have the same issue.

A easy way to reproduce is:

  1. Create a new Craft install,
  2. Add a new Site with another language, so we have 2,
  3. Create a section, I've done a Structure,
  4. Create a entry in that structure,
  5. and finally try to duplicate it using Save as a New Entry

Can confirm that on 3.1.29 worked, and from 3.1.30 it doesn't.

Additional info

brandonkelly commented 5 years ago

We are releasing Craft 3.2.0 on Tuesday, which brings some improvements to element duplication. Can you please test on that?

To update to 3.2.0 ahead of time, change your craftcms/cms requirement in composer.json to:

"require": {
  "craftcms/cms": "^3.2.0-RC3",
  "...": "..."
}

Then run composer update.

joao-proenca-ef commented 5 years ago

The Craft 3.2.0 RC3 seems to work correctly!

lukasNo1 commented 5 years ago

Yes, 3.2.0 RC3 fixes the duplicating for me too.

Im gonna go ahead and close the issue.

brandonkelly commented 5 years ago

@joao-proenca-ef @lukasNo1 Thanks for confirming!