Problem/Motivation
When creating a new Media type entity, the form validation and submit functions use if ($form['source_dependent']['source_configuration']) { to check for the existence of the enclosed value.
This causes an Undefined index error which prevents AJAX from loading the source dependent configuration forms.
Proposed resolution
Use if (array_key_exists('source_configuration', $form['source_dependent'])) { instead.
Remaining tasks
Review
User interface changes
None
API changes
None
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | media-undefined-index-2932222-1.patch | 1.35 KB | darvanen |
Comments
Comment #2
darvanenComment #3
chr.fritschPatch looks good.
Would be nice to get a fail patch to visualize the error.
I tried to create one by setting
error_reporting(E_ALL);or$this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_ALL)->save();inMediaSourceFileTest, but it didn't break.Comment #4
darvanenSeems like this is no longer an issue.
Comment #5
darvanenOh, I'm an idiot, I had the patch installed on that environment (momentarily confused).
Still trying to figure out why this doesn't present on a vanilla install.
Comment #6
marcoscanoI believe the fixes from this patch were committed as part of #2932226: Media Type entities don't validate machine name properly.
Comment #7
darvanenAh, similar but different, but they'll definitely do the job, great =)