Problem/Motivation
We noticed this error:
Error: Call to a member function save() on null in /app/web/modules/contrib/dropzonejs/modules/eb_widget/src/Plugin/EntityBrowser/Widget/InlineEntityFormMediaWidget.php on line 178 #0 [internal function]: Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget\InlineEntityFormMediaWidget->submitEdit(Array, Object(Drupal\Core\Form\FormState))
This happens because \Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget\DropzoneJsEbWidget::getFiles adds whatever it gets from \Drupal\dropzonejs\DropzoneJsUploadSave::createFile to $files.
A case when this might happen if size validation failed.
Proposed resolution
Check if the entity was created.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3083640-check-created-entity-2.patch | 605 bytes | primsi |
Comments
Comment #2
primsi commentedSmall patch that should address this.
Comment #3
berdirNot sure if we can add a test for this, would probably have to set the max file size very low?
Comment #4
primsi commentedComment #7
primsi commentedCommitted.