U4-9912 - Previewing without changing creates new version

Created by Murray Roke 14 May 2017, 22:45:40 Updated by Nathan Skidmore 02 Aug 2018, 09:58:49

Tags: Regression

Subtask of: U4-9609

This is a regression of a previously fixed issue: http://issues.umbraco.org/issue/U4-5510

In 7.5.11, If I open a page, click preview without making any changes, then the green plus appears. It should not.

1 Attachments

Comments

Murray Roke 14 May 2017, 22:48:08

Regression of the 'fix' for the above issue


Murray Roke 14 May 2017, 22:49:12

Asside: Could the 'preview' button change to 'view' if there are no changes, and simply launch the app as per the link on the properties tab? (downside you don't get the mobile device frame UI)


Shannon Deminick 15 May 2017, 06:22:28

I've just debugged through the code and it's actually not saving another version, it's just the UI that shows the green bar even though nothing has changed. I'll fix up the UI parts


Shannon Deminick 15 May 2017, 06:29:03

PR for review: https://github.com/umbraco/Umbraco-CMS/pull/1943

This will check if the version of the document changes during saving, if it doesn't change it returns a no operation status. In the controller we now check for a no-op and if that is the case we don't add a UI message.

To test:

  • Publish a content item - you will always get a UI message
  • Don't update anything and Save the content item - you will not get a UI message (you'll still get a green check mark on the button but that is ok)
  • Don't update anything and Preview the content item - you will not get a UI message (you'll still get a green check mark on the button but that is ok)
  • Change something and press Save - you will get the UI message
  • Change something and Preview - you will get the UI message


Srdjan Donevski 10 Oct 2017, 15:07:11

Hi @Shandem , is this resolved as I am still able to see this green plus as node is changed in umbraco v7.6.3? And what did you mean by 'you'll still get a green check mark on the button but that is ok' in case of previewing without changing nodes? If you talking about small green circle over node icon it could confuse user that node has changes (actually, clients reported this as an issue in one of projects I am working on)? Thanks, Srdjan


Nathan Skidmore 02 Aug 2018, 09:58:49

I just opened a node in Umbraco version 7.9.2, didn't make any changes and clicked preview. This automatically created an audit item in the node history: Save Content performed by user.

Therefore preview continues to save the node, even when no changes were made.


Priority: Normal

Type: Bug

State: Reopened

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.5.11

Due in version:

Sprint:

Story Points:

Cycle: 4