[BUGFIX] Throw a speaking exception on missing summary mail settings - #79
Merged
BastiLu merged 3 commits intoSep 18, 2026
Conversation
ConfigurationService::getTypoScriptSettingsByPath() returns an empty string when the given path cannot be resolved. SendSummaryService used that return value as an array, which fails with TypeError: Cannot access offset of type string on string The error points at SendSummaryService instead of the actual cause: the static TypoScript of EXT:lux is not part of the TypoScript template of the site the command runs against. Multi-site installations run into this easily, because ExtbaseCommandTrait binds the request to SiteService::getDefaultSite(), which is the first site returned by the SiteFinder and not necessarily the site lux is configured for. The configuration is now resolved once, validated, and reused by getSender(), getSubject() and getMailTemplate(). A missing configuration raises a ConfigurationException naming the TypoScript path that has to be included.
BastiLu
self-requested a review
September 18, 2026 13:11
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.
What
ConfigurationService::getTypoScriptSettingsByPath()returns an empty string when the given pathcannot be resolved.
SendSummaryServiceused that return value as an array:which fails with
The configuration is now resolved once, validated, and reused by
getSender(),getSubject()andgetMailTemplate(). A missing configuration raises aConfigurationExceptionnaming the TypoScriptpath that has to be included.
Why it matters
The
TypeErrorpoints atSendSummaryServiceinstead of the actual cause: the static TypoScript ofEXT:lux is not part of the TypoScript template of the site the command runs against.
Multi-site installations run into this easily, because
ExtbaseCommandTrait::initializeExtbase()binds the request to
SiteService::getDefaultSite()— which iscurrent($siteFinder->getAllSites()),i.e. the first site in filesystem order, not necessarily the site lux is configured for. Tracking
down the real cause from that error message takes a while.
Behaviour change
getSubject()andgetMailTemplate()previously fell back to an empty string when the wholeconfiguration branch was missing, producing a mail with an empty subject or an unresolvable template
path. They now raise the same
ConfigurationException. Individual missing keys still fall back toan empty string via
??, so partial configurations behave as before.Verified
Against 44.3.0 in a TYPO3 13.4 / PHP 8.2 installation:
ConfigurationExceptionwith the path in the message, instead of theTypeErrorsender
Related
The non-deterministic site selection in
SiteService::getDefaultSite()is the second half of thisproblem and is reported separately in #80 — this PR only makes the failure understandable.