When this module is enabled you no longer have the ability to within the filters area setup grouped filters. When you try to do it you are dropped back to the views interface instead of remaining within the popup window. I don't really see the logic of having this module active with the views module is there a way that it can be disabled while in the views module?

Thanks in advance.

Comments

greggles’s picture

Title: Breaks Views » Make hide_submit compatible with views (disable within views?)

Updating title. I haven't noticed this problem, personally.

Christopher Riley’s picture

This took care of the issue for myself and at least one other as discussed at https://drupal.org/node/1939426

greggles’s picture

Yeah, I'm not debating whether it happens or not (I'm sure it does) - just saying it doesn't affect me so I'm not likely to work on it myself.

greggles’s picture

I wonder if we should just not include the javascript inside admin/structure/views/*

Anonymous’s picture

The same problem & solution for me. Included an if check inside function hide_submit_form_alter, as suggested by greggles.


function hide_submit_form_alter(&$form, &$form_state, $form_id) {
  if (arg(0) == 'admin' && arg(1) == 'structure' && arg(2) == 'views') {
    return;
  }

  // Add javascript.
  //etc. . . . .

}
greggles’s picture

The solution in #5 works, but is a bit brittle.

I wonder how we could make this a bit more generic, perhaps using the block visibility code and letting people enter the paths where they don't want the module to show up?

mogwaay’s picture

I've fixed the problem here by utilizing the hook_hide_submit_alter hook:

function mymodule_hide_submit_alter($hide_submit_settings) {
  $arg = arg();
  // If the current path is a views admin screen, disable hide submit
  if(
    $arg[0] == 'admin'&&
    $arg[1] == 'structure' &&
    $arg[2] == 'views'
  ) {
    $hide_submit_settings['hide_submit']['hide_submit_status'] = FALSE;
  }
  return $hide_submit_settings;
}

This way I don't need to hack or patch the module. This hook is good to allow sites to specify certain pages/forms that shouldn't use the hide_submit functionality or change it in some way on an instance by instance basis.

Obviously would be cool to provide a include/exclude from paths style configuration for non-coders to control this more, but this is still quite standard.

greggles’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

I think the "right" way to solve this is in #1979522: Disable selected form from Hide Submit processing.

Thanks to @mogwaay and @rhclayto for providing workarounds for now.