This issue was discovered while using media browser in conjunction with radix as the front end theme. When changing an image via media browser and saving the node the above php fatal will occur. This was tested within an inline entity form and I have not tested independently of the inline entity form.
The problem appears to be with the way that radix includes files which creates the possibility of them being included on pages that use the administration theme. This means that radix_element_info_alter fires and attaches the process function but on submission of the form the files are not included (they shouldn't be) causing the fatal error.
Patch attached to load include files using the info file in the standard Drupal way.
Comment | File | Size | Author |
---|---|---|---|
#11 | call_to_undefined-2772783-11.patch | 1.51 KB | adam-delaney |
#8 | radix-2772783-2.patch | 1.34 KB | JamesDevware |
Comments
Comment #2
JamesDevware CreditAttribution: JamesDevware commentedSorry, removing diff file extension.
Comment #3
JamesDevware CreditAttribution: JamesDevware commentedComment #4
JamesDevware CreditAttribution: JamesDevware commentedComment #5
JamesDevware CreditAttribution: JamesDevware commentedComment #6
JamesDevware CreditAttribution: JamesDevware commentedComment #7
JamesDevware CreditAttribution: JamesDevware commentedIgnore above patches, The issue was that media/ajax/* doesn't use the admin theme so when the form elements are loaded they have the radix process attached to them. On submission of the form the admin theme is used (rather than radix) so drupal doesn't load the include files that are required to run the process function resulting in the PHP fatal error.
I am not sure that using hook_element_info_alter and #process is necessarily the best way to go given that the theme is not always loaded. This does seem to be causing a few issues.
Comment #8
JamesDevware CreditAttribution: JamesDevware commentedSwitching from using #process to #pre_render appears to maintain the intended functionality of adding classes to the elements but without causing issues when mismatched themes are used when loading forms and submitting.
Comment #9
shadcn CreditAttribution: shadcn at Chapter Three commentedTesting. Thanks.
Comment #10
adam-delaney CreditAttribution: adam-delaney commentedTested and this patch resolves my issue.
Comment #11
adam-delaney CreditAttribution: adam-delaney at The University of Iowa commentedUpdating this patch to work with the 7.x-3.x-dev branch
Comment #12
adam-delaney CreditAttribution: adam-delaney at The University of Iowa commentedThis issue is causing major problems primary when ajax calls are being made in the administration theme. I would be great if we can get this reviewed and committed. Thanks.
Comment #14
shadcn CreditAttribution: shadcn at Chapter Three commentedThanks.