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.

Comments

wilco created an issue. See original summary.

wilco’s picture

damienmckenna’s picture

Status: Active » Needs review

Thank you for the bug report and the patch. Let's see what the testbot thinks.

Out of interest, how are you rendering the view?

damienmckenna’s picture

Version: 7.x-3.25 » 7.x-3.x-dev
damienmckenna’s picture

StatusFileSize
new647 bytes

I 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?