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

Placeholders incorrectly set by JS on validation errors for new pages #79

Open
sam-mi opened this issue May 2, 2016 · 0 comments
Open
Labels

Comments

@sam-mi
Copy link

sam-mi commented May 2, 2016

Steps to reproduce:

  • Create a new page, selecting a type and clicking Save (do not click save yet on the next step of the creation process)
  • Select a layout and add content to placeholders
  • Leave a required field such as title blank, and save
  • Django will come back with a validation error for the required field

However, at this stage, the placeholders will have been incorrectly initialised, and saving again will result in a generic validation error with no fields highlighted to indicate what the problem is. There will also be a number of superfluous placeholder tabs labelled "new..." visible.

Selecting a different layout and then the desired one again seems to resolve the problem, by getting the JS to re-initialise the placeholders.

Requiring the JS to re-initialise the placeholders when the page is loaded with the validation error is likely to fix the problem.

@vdboor vdboor added the bug label May 4, 2016
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

2 participants