Feature/email attachments and non data fields - #4
Merged
Merged
Conversation
Api/Action/Email.fusion offered EVERY field of the form as a {placeholder} for
the mail body, including the ones that carry no user data — the submit button and
the captcha. Both are registered in fieldTypes.omitted, which is precisely the
list of field types whose values are kept out of {allFormValues} and out of the
mail, so an editor who inserted {submit} or {captcha} got a placeholder that
silently resolves to nothing.
Fields without a name are dropped for the same reason: they cannot be addressed
by a placeholder at all (the honeypot is one).
Both rules are the ones ValidationSchema.fusion already applies to the same set
of fields, down to reading the name off `properties` rather than through a
FlowQuery per field, so the two now agree on what counts as a usable field.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtwrKskrJU8Q6YbnR19QT6
The DatabaseStorage action stored EVERY submitted value, including the fields
that carry no user data. The captcha is the one that shows: its solution is
several kilobytes of base64, spent the moment it was verified, and it sat in
every row of the DatabaseStorage backend module and every CSV export next to
the name and e-mail an editor is actually there to read.
fieldTypes.omitted is already the list of field types whose values are kept out
of {allFormValues} and out of the mail, and getNonDataFieldNames() already
resolves it to this form's field names — the Email action a few lines above
calls it for exactly this purpose. Storage simply never asked.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NtwrKskrJU8Q6YbnR19QT6
…s #55391) An upload field left an empty row in the notification mail: the label was printed, the value was blank. FormService::stringify() knows CachedUploadedFile (the Fusion-rendered upload path), but FormApiController resolves a submitted [_uploadedFileIdentifier] into a Neos\Flow\ResourceManagement\PersistentResource, which stringify() has no branch for. PersistentResource has no __toString() either, so it is not \Stringable and fell through to the final `return ''`. The file itself was attached (attachUploads), so the mail carried an attachment the value list could not account for — with more than one upload field, the recipient cannot tell which attachment answers which question. PersistentResource is already imported in this file. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NtwrKskrJU8Q6YbnR19QT6
The e-mail action could attach one thing: what the visitor uploaded (attachUploads). A file the editorial side wants to send along — the information sheet, the form to fill in, the directions to the building — had no field, so a confirmation mail could only ever point at a download page and hope. Adds an `attachments` property: assets from the media browser, attached to every mail the action sends, independent of what was submitted. The stream-to-DataPart step the uploads already used is pulled into attachResource() and now serves both, so an asset in a cloud storage works for the same reason an upload does. The property is deliberately unrestricted: which asset sources an installation may attach from is a project decision, and the README shows the override that makes it. No size check either — what a mail relay accepts is its own setting. sendEmail() takes the new argument last so that positional callers, such as a project's own FormActionHandlerInterface implementation, keep working. Verified end to end in a PHLU installation: the e2e suite submits the fixture form with two uploads and an asset picked on the action, and the mail carries all three. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NtwrKskrJU8Q6YbnR19QT6
lorenzulrich
marked this pull request as ready for review
September 16, 2026 09:24
lorenzulrich
approved these changes
Sep 16, 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.
No description provided.