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

Save action doesn't reflect dirty state in content block page after validation error #840

Open
brynwhyman opened this issue Oct 2, 2020 · 0 comments

Comments

@brynwhyman
Copy link

brynwhyman commented Oct 2, 2020

Overview

This has been split from silverstripe/silverstripe-admin#1110 which focused on fixing the bug for CMS Pages.

There is a scenario where the save action is not accurately reflecting that state of the CMS elemental form after a validation error - showing that it is 'Saved' when the content is still 'dirty'/ not saved to the database.

ACs

  • The Save/Publish actions on a CMS page with unsaved changes in an ElementalArea remain in a dirty state when a save operation returns a validation warning on the page
  • Any block that was edited retains a 'modified' icon indicator when a save operation returns a validation warning on the page
  • A CMS page with an ElementalArea comes back in a clean state when a save operation returns no validation warnings on the page (successfully saves)

Note: "... validation warning on the page" could include:

  • Within the primary nav tabs (Content, Settings, History, etc)
  • Within a child tab (Content > 'Custom tab')
  • Within a contained gridfield detail view

Reproduction steps

  1. Have a page with a required field (e.g. within a content block)
  2. Enter content in a content block WYSIWYG, do not enter content in the required field
  3. Attempt to save the form
    Expected result: the page does not save due to validation errors, the save action remains in a 'dirty' state as "Save"
    Actual result (bug): the page does not save due to validation errors, the save action changes to a "Saved" state while the content has not been saved
  4. Refresh the page to confirm that the content block WYSIWYG content did not save

Version

CMS 4.6.1
Elemental 4.4.1

Notes

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

2 participants