Issue Bug Under Review

#109867Page creation wizard silently creates pages with empty title and fallback slug when Next is clicked before field blur

Wolfgang Klinger 05/24/26, 10:20 updated 11/13/26, 16:13

Description

Summary

In the page creation wizard (“Create new page”, v14+ modal flow), typing a title and clicking Next on the “Page Setup” step before the title field’s change/@blur@ event has fired silently creates a page
with title='' and an auto-generated fallback slug. No validation error is raised.

Steps to reproduce

  1. Drag a new page into the page tree (or open the page wizard via the toolbar button).
  2. Step 1: pick a parent. Step 2: pick doktype. Step 3: “Page Setup”.
  3. Type a title into the Page title field.
  4. Click Next immediately — do not press Tab or click elsewhere first.
  5. Confirm and create.

Expected

Either the page is created with the typed title, or the wizard rejects the submission with a “title is required” validation error.

Actual

The page is created with title='' and a fallback slug. The typed title is silently discarded.

Root cause

In typo3/sysext/backend/Resources/Public/JavaScript/page-wizard/steps/form-engine-step.js (source: Build/Sources/TypeScript/backend/page-wizard/steps/form-engine-step.ts):

  1. FormEngine renders each editable field as a visible input (carrying data-formengine-input-name) plus a hidden mirror input (carrying name). The visible→hidden sync runs in a change handler
    (FormEngineValidation.updateInputField()) and only fires on blur. Clicking Next in the same tick leaves the hidden mirror empty.
  2. FormEngineStep.getValue() reads FormData (the hidden mirrors) and then strips every empty entry:
return Object.fromEntries(
    Array.from(formData.entries()).filter(([, value]) => value !== '')
);

…so the empty title silently disappears from the POST to wizard_submit. Server-side, PageWizardProvider::handleSubmit() then lets DataHandler fill the missing field from TCA defaults without raising an
error.

Why no test caught this

  • PageWizardProviderTest calls handleSubmit() directly with a well-formed payload.
  • The Playwright fixture Build/tests/playwright/fixtures/page-wizard.ts does input.press('Tab') between filling the title and clicking Next (comment: // triggeres change event), which masks the race.

Suggested fixes

  1. Primary: in FormEngineStep.getValue(), force a synchronous visible→hidden sync before reading FormData — iterate every [data-formengine-input-name] inside the wizard form and call
    @TYPO3.FormEngine.Validation.updateInputField(name)@ (or dispatch a change event on each visible input).
  2. Drop the empty-value filter in getValue(). Empty values are meaningful and must be sent so server-side validation runs as in the regular FormEngine flow.
  3. have PageWizardProvider::handleSubmit() reject submissions missing TCA-required fields instead of relying on DataHandler defaults.

Reviews 1

History 12