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

[3.x]: "Save as new" now produces very confusing workflow on the original Element #12102

Closed
MattWilcox opened this issue Oct 12, 2022 · 2 comments

Comments

@MattWilcox
Copy link

What happened?

Description

What feels like corruption or data loss, but technically isn't (though you can for sure end up making URLs vanish or lose data if you don't catch what's happening).

The process can be seen in this video: https://www.youtube.com/watch?v=sX2i5feyCQA

Steps to reproduce

  1. Open an existing Entry
  2. Edit the Entry (in the video, this was a Title and Slug)
  3. Save As New
  4. Go back to the Entries area, and load up the original Entry
  5. It reflects all the changes from "the new one" rather than its unaltered original state

This can cause massive confusion, especially if that "original unaltered" entry is then saved "without making changes" because you then end up with "the original Entry" being a duplicate of "the new Entry" instead of remaining as it was.

Expected behavior

I get why this is happening - but it feels very wrong; the editor is not expecting any changes on the original Entry.

When the "Save as New" is used, I would expect that everything that was stored as "in progress / draft / unsaved changes" on the original Entry during this work should be completely discarded - all of those changes exist on the new Entry, in fact that's the very point of "save as new". The original should not be altered, and that includes "unsaved changes", as it can become extremely confusing.

Craft CMS version

3.7.56

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

This has come up before.

We’ve partially resolved it for Craft 4 with the new “Showing your unsaved changes” banner, however we are considering completely discarding the provisional draft when “Save as a new entry” is selected, for a future Craft 4.x release.

We won’t be adjusting the behavior for Craft 3 though, since this is currently working as intended (albeit possibly a bit confusing).

@brandonkelly
Copy link
Member

As of Craft 4.3 (released earlier this week), when you press “Save as a new entry” for a provisional draft (an entry with unsaved changes), the unsaved changes will automatically be discarded after the duplicate entry is created.

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

3 participants