Problem/Motivation
When rendering a view with an exposed form programmatically, no #theme value is set when the system attempts to render a view with an exposed form. In this case, the views data is rendered out to csv.
Steps to reproduce
Render a view with an exposed form programmatically and note "Theme hook not found" error in dblog.
Proposed resolution
Slightly alter the code in views_plugin_exposed_form.inc to set the form's '#theme' value to an array containing a blank key if it is not present to prevent the generation of the "Theme hook not found" error.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | views-n3346306-5.patch | 647 bytes | damienmckenna |
| #2 | 3346306-views_plugin_exposed_form-theme-hook-not-found-2.patch | 798 bytes | wilco |
Comments
Comment #2
wilco commentedComment #3
damienmckennaThank you for the bug report and the patch. Let's see what the testbot thinks.
Out of interest, how are you rendering the view?
Comment #4
damienmckennaComment #5
damienmckennaI reworked the patch to correct the path, and the coding standards. I noticed that it created an element in the array that is an empty string - is that needed, or can it be an actual empty array?