-
-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Describe the bug
Description
When importing content with Feed Me into a Formie File Upload field, the import fails with a fatal error because verbb\formie\fields\FileUpload does not implement resolveDynamicPathToFolderId().
Feed Me treats Formie FileUpload as an asset-like field and calls this method (which exists on Craft’s native Assets field), causing a runtime exception.
Steps to Reproduce
- Craft CMS 5.x
- Formie 3.1.6
- Feed Me ^6.0.0
- Create a Formie form with a File Upload field
- Attempt to import data into this field using Feed Me
- Import fails immediately
Actual Behavior
Fatal error during import:
Calling unknown method:
verbb\formie\fields\FileUpload::resolveDynamicPathToFolderId()
Stack trace points to Feed Me’s Assets field importer.
Expected Behavior
Formie FileUpload should be compatible with Feed Me asset imports and not cause fatal errors.
Root Cause
Craft’s native craft\fields\Assets field defines:
public function resolveDynamicPathToFolderId(?ElementInterface $element = null): int
{
return $this->_uploadFolder($element)->id;
}Suggested Fix
Add the following method to verbb\formie\fields\FileUpload:
use craft\base\ElementInterface;
public function resolveDynamicPathToFolderId(?ElementInterface $element = null): int
{
return $this->_uploadFolder($element)->id;
}Craft CMS version
5.8.11
Plugin version
3.1.6
Multi-site?
No response
Additional context
Metadata
Metadata
Assignees
Labels
No labels