The save, finished and cancel submit button of the modal pop-up don't work when a exposed view filter is added to a panel.
It is for example not possible to add an id or class to any pane, or change the settings.

The exposed filter is an autocomplete fulltext search block for search API.

There is no PHP or javascript error so not sure where to look.

Comments

tom-d’s picture

I have the same issue, disabling the search_api_autocomplete module made the ctools modal buttons work again.

joelpittet’s picture

I'm having this issue too.

joelpittet’s picture

Status: Active » Needs review

Ok, after a bunch of debugging I narrowed the issue down.

It seems to be caused by the call to drupal_build_form()
views/plugins/views_plugin_exposed_form.inc:161

Prevent that from running. This could be a views issue or maybe core issue depending but something is bleeding information between the forms.

ctools_block_content_type_admin_info() does a good job of stripping off the form tags, which is essential to render the form in a form, so that's not it...

Please give the temporary solution to saving the form a try and report back that it allows you to save. We can dig deeper if we are all on the same page.

joelpittet’s picture

Heres a little diff for how I got it to allow me to save (Warning not a real solution, just a way to "expose" the problem)

Apply this inside of views:

diff --git a/plugins/views_plugin_exposed_form.inc b/plugins/views_plugin_exposed_form.inc
index 5d54600..4aae9f9 100644
--- a/plugins/views_plugin_exposed_form.inc
+++ b/plugins/views_plugin_exposed_form.inc
@@ -158,9 +158,9 @@ class views_plugin_exposed_form extends views_plugin {
     }

     $form_state['exposed_form_plugin'] = $this;
-    $form = drupal_build_form('views_exposed_form', $form_state);
+    // $form = drupal_build_form('views_exposed_form', $form_state);
+    $form = [];
     $output = drupal_render($form);
-
     if (!$this->view->display_handler->displays_exposed() || (!$block && $this->view->display_handler->get_option('exposed_block'))) {
       return "";
     }
mvdve’s picture

Removing the exposed form from the output variable solved the issue in the administrator interface. I checked all html classes but didn't find a difference.

joelpittet’s picture

Something from drupal_render() could be the issue but I have a feeling it's something escaping from drupal_build_form().

joelpittet’s picture

Title: pagemanager save/finished/cancel button not working with view exposed filter » Page Manager form actions not working with views exposed filters
krlucas’s picture

Status: Needs review » Active

Setting status back to active since there's no patch here to review.

I got here from https://www.drupal.org/node/2496231 which is marked as a duplicate of this issue though I'm not sure if that's true. In that issue it was reported that if you add a View with an exposed filter to a Panel AND the exposed filter is configured to be REQUIRED, the Panels UI breaks. You can't move panes around, change pane settings or really do anything that "sticks". You can move things around, change pane settings, but when you click "Update and Save" the changes aren't actually saved. You can't even remove the offending pane.

The issue is that the required exposed filter somehow causes form validation errors (that are not displayed) that prevent the Panels UI from saving the panel.

@joelpittet and @mvdve, can you confirm that the exposed filter in your cases had a required input?

joelpittet’s picture

@krlucas try my hack in #4 to see if it helps the page to save.

My exposed filter (Search API full text field) is required. The problem is that the form HTML tag get's rendered twice on the page, which breaks the form from my point of view.

martini9011’s picture

I was running into the same issue (or similar issue) as well. For me it happens on normal pages (have not looked into modal pop-ups yet).

I've created a small patch which disables the exposed form rendering for admin pages. I understand that this is not a solution that will work for people who are using exposed view forms on their admin pages. But for those that don't it fixes the issue.

Quick note, I ran this patch against the 7.x-3.x-dev branch of views

martini9011’s picture

Status: Active » Needs review

Marking as needs review to make sure the patch will be checked.
Also, should this be moved to views, since the issue seems to be in the implementation of views within page manager?

joelpittet’s picture

Thanks for the patch @martini9011, that seems like a good work around for now I think.

jbloomfield’s picture

The patch in #10 fixes the issue in Page Manager but also hides all exposed filter forms in the admin. e.g we have a exposed filter form on our admin/content view page. So I think this requires more investigation.

alexmoreno’s picture

Version: 7.x-1.x-dev » 7.x-1.3
StatusFileSize
new622 bytes

Right, the previous patch does break some pages like admin/content, as some people has already noticed.

The problem is that view_special_blocks() checks that we don't interfere with avoid the admin forms, although it assumes that this will only happen in views, when it can also happen (and it happens) in pages.

This patch fixes that for 1.3 to 1.5.

joelpittet’s picture

Version: 7.x-1.3 » 7.x-1.x-dev
jrochate’s picture

Thanks. One afternoon spent debuging why panels with 30 regions didn't work, until concluded was due to exposed filter.
This #14 solve it, applied on views project.

ianwesty’s picture

Re-rolled for 7.x-3.23

japerry’s picture

Status: Needs review » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.