I have Webform 6.1.5 running in a D9.5 website, that has lots of other contrib modules.
Using the Webform Attachments sub-module I have some simple forms that require files to be attached to the submission. The files are being uploaded [to the temporary
_sid_ folder] but not to the submission folder once the webform is submitted, nor are the files referenced in the submission. If 'preview' is enabled, the files are not visible in the preview.
Conversely, using the Webform 'Test' function, sample file attachments are uploaded and added to the submission, which is the correct behaviour.
I cannot reproduce this behaviour on a vanilla D9.5 installation, so it looks like there's a conflict [with another module] that's crept in, and I'm not sure how best to approach this. So I'd welcome any suggestions.
Things I have checked:
- Private and Temporary files folder permissions - all fine
- Private folder path changed from relative to absolute - no change
- Disabled multi-language and translation modules and config (see https://www.drupal.org/project/drupal/issues/2797639 - now fixed, but you never know).
- Changed permissions (both via Webform Access and core 'View own webform' permission)
- Added (private) file upload to Content type - works fine and is downloadable.
- Looked at other file upload systems - DropzoneJS and Plupload - but additional modules required to work with Webform.
- Installed all the Webform libraries (rather than coming from CDN). No change
- Checked PHP and DB resource settings (max_allowed_packet, max_input_vars, post_upload_size etc) - seem adequate and have added a bit more to check.
- Have enabled Webform 'Debug' handler - file fields in submission are empty
- No JS errors posted in the Console (EDIT: also disabled JS in browser; no change observed)
- Have tried disabling lots of modules, especially those that could have an impact on file handling or forms; however, not much left now and no change observed.
- There's this issue that looks similar (https://www.drupal.org/node/3118815) but there was never any follow up.
- EDIT: also tried system in default front-end and admin themes
- EDIT: Also uninstalled Webform module, then re-installed and created simple form with File Upload field. No change - so clearly not an issue with Webform default config.
I'm not sure where to to insert some breakpoints in the module code. Looking at
webform/src/WebformSubmissionInterface.php it looks like all the functionality is inherited from Core ContentEntityInterface and EntityOwnerInterface... or whether this is a JS issue.