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

[4.x] Editing copy/pasted embed entries will edit both the original and copied entry #186

Closed
brionwolf opened this issue Mar 5, 2024 · 3 comments
Assignees
Labels

Comments

@brionwolf
Copy link

Description

Editing copy/pasted embed entries will edit both the original and copied entry. (I'm not sure if this should be added to the CMS repo or here, but I'm starting here).

Steps to reproduce

  1. Create and add a CKEditor field with embeddable entries to a section or other layout
  2. Create or edit an entry that includes the CKEditor field.
  3. Add an emebeded entry from the "New Entry" dropdown in the CKEditor field.
  4. Select, copy, and paste the newly created entry as a second embeded entry in the CKEditor field.
  5. Attempt to modify the second embeded entry.

Expected Result

  • The newly created entry that was copy/pasted from the original is modified while the original is not.

Actual results

  • Both the original entry, and the newly created entry are modified based on subsequent changes to either entry.

Screenshots

Example CKEditor field with a simple entry type:
Copying an embedded entry within a CKEditor field

Workaround:
Creating a new emedded entry in a CKEditor field

  • Manually creating a separate entry from the "New entry" dropdown does not trigger this duplicating effect.

Additional info

  • Craft version: Craft Pro 5.0.0-beta.6
  • PHP version: 8.3.1
  • Database driver & version: MySQL 8.2.0
  • Plugins & versions:
    • CKEditor | 4.0.0-beta.7
@brionwolf brionwolf added the bug label Mar 5, 2024
@brandonkelly
Copy link
Member

Those cards are just references to the nested entries. If you copy/paste the card, you’re just creating a second reference to it; not actually duplicating the nested entry. We’ll discuss internally whether we should make it impossible to duplicate the cards in the first place, to help avoid that confusion.

@brandonkelly
Copy link
Member

We just tagged version 4.0.0, which adds support for automatically duplicating nested entries when entry cards are copy/pasted. (#192)

@brionwolf
Copy link
Author

Thank you @brandonkelly @i-just! Works great, and our content authors will love it!

Screenshot 2024-03-15 at 4 48 46 PM

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

No branches or pull requests

3 participants