Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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 CreditAttribution: Primsi at MD Systems GmbH for MD Systems GmbH 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 CreditAttribution: Primsi at MD Systems GmbH for MD Systems GmbH commentedComment #7
Primsi CreditAttribution: Primsi at MD Systems GmbH for MD Systems GmbH commentedCommitted.