[BUGFIX] Backend form selector and module must not apply frontend enable column restrictions#1354
Merged
mschwemer merged 1 commit intoin2code-de:masterfrom Mar 5, 2026
Conversation
…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
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Forms with
starttimeorendtimeset are invisible in two places in the TYPO3 backend: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'sDefaultRestrictionContaineractive. This automatically appliesStartTimeRestrictionandEndTimeRestrictionbased on the form TCA'senablecolumns, 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 thedisabled,starttime, andendtimeenable column restrictions.In both cases
starttime,endtimeandhiddenare frontend visibility controls. They should not prevent backend users from accessing or managing form records.Fix
FormSelectorUserFunc::getAllForms()Remove
StartTimeRestrictionandEndTimeRestrictionfrom the QueryBuilder. Hidden forms remain filtered — a hidden form should intentionally not be selectable in the plugin configuration.FormRepository::findAll()andfindAllInPidAndRootline()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.