Skip to content

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

Open
@sam-mi

Description

@sam-mi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions