Skip to content

fix: always register FormEngine inline settings - #52

Open
konradmichalik wants to merge 1 commit into
xima-media:masterfrom
konradmichalik:fix/formengine-inline-settings
Open

fix: always register FormEngine inline settings#52
konradmichalik wants to merge 1 commit into
xima-media:masterfrom
konradmichalik:fix/formengine-inline-settings

Conversation

@konradmichalik

@konradmichalik konradmichalik commented Apr 30, 2026

Copy link
Copy Markdown

Fixes #51.

recordlist-row-edit-multiple.js uses top.TYPO3.settings.FormEngine.moduleUrl unconditionally and pulls @typo3/backend/form-engine.js as a transitive dependency, which reads TYPO3.settings.FormEngine.formName at module-evaluation time.

With the default WORKSPACE_ID = 0, both inline settings were never registered → Uncaught TypeError: Cannot read properties of undefined (reading 'formName') on every page load.

Move the two FormEngine inline settings in loadWorkspaceScripts() out of the if ($this::WORKSPACE_ID) branch. Workspaces, RecordHistory and WebLayout stay workspace-only.

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown

Walkthrough

The loadWorkspaceScripts() method in AbstractBackendController.php has been refactored to always register the FormEngine.moduleUrl and FormEngine.formName inline page settings. Previously, only moduleUrl was registered and only when the WORKSPACE_ID constant was truthy. These two settings are now registered unconditionally before the workspace-specific conditional block, ensuring they are available regardless of workspace mode. Other workspace-specific settings remain within the conditional branch.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: always register FormEngine inline settings' is clear and specific, accurately describing the main change in the pull request.
Linked Issues check ✅ Passed The pull request directly addresses issue #51 by moving FormEngine inline settings (moduleUrl and formName) outside the WORKSPACE_ID conditional block to ensure they are always registered, preventing runtime errors.
Out of Scope Changes check ✅ Passed All changes in AbstractBackendController.php are directly related to fixing the FormEngine inline settings registration issue described in #51 with no extraneous modifications.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

Always register FormEngine inline settings

1 participant