Skip to content

[BUGFIX] Backend form selector and module must not apply frontend enable column restrictions#1354

Merged
mschwemer merged 1 commit intoin2code-de:masterfrom
aseemann:bugfix/backend-form-selector-ignores-frontend-enable-column-restrictions
Mar 5, 2026
Merged

[BUGFIX] Backend form selector and module must not apply frontend enable column restrictions#1354
mschwemer merged 1 commit intoin2code-de:masterfrom
aseemann:bugfix/backend-form-selector-ignores-frontend-enable-column-restrictions

Conversation

@aseemann
Copy link

@aseemann aseemann commented Mar 5, 2026

Problem

Forms with starttime or endtime set are invisible in two places in the TYPO3 backend:

  1. Plugin FlexForm selector — editors cannot select the form when configuring a powermail content element
  2. Powermail backend module overview — forms do not appear in the module list at all

Additionally, hidden forms do not appear in the backend module, making it impossible to unhide them there.

Root cause

FlexForm selector (FormSelectorUserFunc::getAllForms)

DatabaseUtility::getQueryBuilderForTable() returns a QueryBuilder with TYPO3's DefaultRestrictionContainer active. This automatically applies StartTimeRestriction and EndTimeRestriction based on the form TCA's enablecolumns, filtering out any form whose frontend visibility window does not include the current time.

Backend module (FormRepository::findAll, findAllInPidAndRootline)

Both methods use Extbase queries without setIgnoreEnableFields, so Extbase automatically applies the disabled, starttime, and endtime enable column restrictions.

In both cases starttime, endtime and hidden are frontend visibility controls. They should not prevent backend users from accessing or managing form records.

Fix

FormSelectorUserFunc::getAllForms()
Remove StartTimeRestriction and EndTimeRestriction from the QueryBuilder. Hidden forms remain filtered — a hidden form should intentionally not be selectable in the plugin configuration.

FormRepository::findAll() and findAllInPidAndRootline()
Add setIgnoreEnableFields(true)->setEnableFieldsToBeIgnored(['disabled', 'starttime', 'endtime']) so all forms appear in the backend module regardless of their current frontend visibility state, allowing editors to manage (hide/unhide/inspect) them freely.

Affected versions

Tested against TYPO3 13.4 / powermail 13.x.

…ble column restrictions

Forms with starttime/endtime set were invisible in both the plugin FlexForm
selector and the Powermail backend module because TYPO3's default query
restrictions and Extbase enable-field handling applied frontend visibility
rules to backend queries.

FormSelectorUserFunc::getAllForms():
Remove StartTimeRestriction and EndTimeRestriction from the QueryBuilder so
forms with a frontend visibility window remain selectable when an editor
configures a powermail content element. Hidden forms are intentionally still
filtered here (a hidden form should not be selectable in the plugin).

FormRepository::findAll() and findAllInPidAndRootline():
Add setIgnoreEnableFields(true)->setEnableFieldsToBeIgnored(['disabled',
'starttime', 'endtime']) so all forms — including hidden and time-restricted
ones — appear in the backend module overview. This allows editors to
hide/unhide and inspect forms regardless of their current frontend
visibility state.

The root cause in both cases is that starttime, endtime and hidden are
frontend visibility controls registered in TCA enablecolumns. They must not
prevent backend users from accessing or managing form records.
@mschwemer mschwemer merged commit af4c06d into in2code-de:master Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants