What's wrong
resources/js/Pages/Events/Index.vue:435-449 (create/duplicate modal) watches the raw textarea text and tries to parse it:
watch(payloadText, (newValue) => {
try {
form.payload = newValue ? JSON.parse(newValue) : null
} catch (e) {
// Invalid JSON - will be handled by backend validation
}
})
(same pattern for form.schema). When JSON.parse throws, the catch block does nothing — form.payload/form.schema simply retain their last-successfully-parsed value. The comment's claim that "backend validation" will handle it is false: the invalid text is never sent anywhere, so the backend never sees it and never has a chance to reject it.
Update (2026-09-13): the equivalent bug in resources/js/Pages/Events/Edit.vue was fixed in #223 (commit 67ab73c), which now tracks payloadJsonError/schemaJsonError, surfaces them via InputError, and blocks save() while either field is invalid. That fix only touched Edit.vue — the create/duplicate modal in Index.vue still has the original silent-catch bug described above. This issue is now scoped to Index.vue only.
Repro
- Open the "Create Event" (or "Duplicate Event") modal on the Events index page.
- Type a Payload or Schema value with invalid JSON (e.g. missing a closing
}).
- Click "Save".
form.payload/form.schema still holds the last successfully-parsed value from before the typo, since the watcher never updated it.
- The request submits successfully (200), the UI reports success — but the stored payload/schema doesn't reflect what was actually typed. The user's input is silently dropped with no error message explaining why.
This is distinct from the already-tracked issue about malformed schemas causing a 500 at trigger time (#55) — this is about edits never reaching the server at all, despite an apparent success.
Why it matters
Silent data loss with a false "success" signal is a serious UX/data-integrity problem — users have no way to know their input didn't take effect.
Suggested fix
Apply the same fix #223 already applied to Edit.vue: track parse failures in local reactive state (e.g. payloadJsonError), display it inline via InputError, and block save while the JSON is invalid, instead of silently falling back to stale data.
What's wrong
resources/js/Pages/Events/Index.vue:435-449(create/duplicate modal) watches the raw textarea text and tries to parse it:(same pattern for
form.schema). WhenJSON.parsethrows, thecatchblock does nothing —form.payload/form.schemasimply retain their last-successfully-parsed value. The comment's claim that "backend validation" will handle it is false: the invalid text is never sent anywhere, so the backend never sees it and never has a chance to reject it.Repro
}).form.payload/form.schemastill holds the last successfully-parsed value from before the typo, since the watcher never updated it.This is distinct from the already-tracked issue about malformed schemas causing a 500 at trigger time (#55) — this is about edits never reaching the server at all, despite an apparent success.
Why it matters
Silent data loss with a false "success" signal is a serious UX/data-integrity problem — users have no way to know their input didn't take effect.
Suggested fix
Apply the same fix #223 already applied to
Edit.vue: track parse failures in local reactive state (e.g.payloadJsonError), display it inline viaInputError, and block save while the JSON is invalid, instead of silently falling back to stale data.