Ticket #378 (closed defect: wontfix)
Page Settings form can't handle invalid form re-display
| Reported by: | notbrain | Owned by: | tboutell |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.4 |
| Component: | apostrophePlugin | Version: | 1.0 |
| Keywords: | page settings permissions ajax invalid form | Cc: | notbrain, team@… |
| Symfony version: | 1.4 |
Description
From my group post:
Hey Guys,
This may be out of the scope of the P'unk Ave goal for what apostrophe
is supposed to support out of the box, but wanted to run this by the
group to see if it's something simple under the hood (as well as if
it's a known issue).
Our Page Settings form has been extended with extra features beyond
what came out of the box, but I just ran a test with Tamper Data to
see if I could replicate it on demo.apostrophe.com, and I am seeing
the same behavior.
What I did to replicate:
1. Open Page Settings for home page
2. Start Tamper data
3. Click submit
4. Use Tamper Data to remove the _csrf field so the form is
invalidated on submit (basically make the form invalid)
5. Allow the form the continue submission as normal
The resulting AJAX roundtrip re-rendered Page Settings Form is not
complete:
1. There are no Save/Cancel/Delete? page buttons (entire footer no
longer there)
2. The Page Permissions dropdowns are not rendered correctly for some
reason (and rendered differently than the original render using the
multichooser js)
Since the out-of-the-box apostrophe Page Settings form doesn't really
allow for invalid submissions (being limited to dropdowns, checkboxes,
and radio buttons), I can see how this is not a real concern unless
the Page Settings form(s) are extended. I only saw this behavior since
we were getting validation errors on our extended fields, and saw the
form re-render with error messages with no way to then make edits and
re-submit the form.
I was able to get the form footer to re-appear, and apply aUI() to it
to get it looking proper, but didn't want to dive in much further into
the Page Perms multi chooser stuff--aMultipleSelect('#a-page-
settings', { })-- before I get some opinions on if I'm on the right
track and/or if this is on your guys' radar.
Thanks!


