Problem/Motivation

Installing the module and opening the views page with one of the following path generates the error.

  • /admin/reports/queue/details
  • /admin/reports/queue/processing
Notice: Undefined index: date_filter in views_handler_filter->accept_exposed_input() (line 1273 of DRUPAL_ROOT/sites/all/modules/contrib/views/handlers/views_handler_filter.inc).

This is caused if the filter handler date_filter is not defined in the environment. It's defined by Views Date (views_date) module.

Steps to reproduce:

  1. Install the advancedqueue module of the dev version.
  2. Open the views page.
  3. You can see the notices.

Proposed resolution

Add if conditions to use the filter and add a notice in README.

Remaining tasks

  • Create a patch
  • Review the patch

User interface changes

(None)

API changes

(None)

Data model changes

(None)

Comments

hgoto created an issue. See original summary.

hgoto’s picture

hgoto’s picture

Status: Active » Needs review
StatusFileSize
new10.9 KB
new24.34 KB

Here's a capture for the notice and a patch to fix this.

capture for the notice

David Sparks’s picture

While waiting for this patch to be committed, people can unset the broken filter as follows:

/**
 * Implements hook_views_pre_build().
 */
function MY_MODULE_views_pre_build(&$view) {
  if ($view->name === 'advanced_queue' && isset($view->filter['date_filter'])) {
    if (!module_exists('date_views')) {
      unset($view->filter['date_filter']);
    }
  }
}
jcnventura’s picture

Status: Needs review » Reviewed & tested by the community

  • hgoto authored 1e39f15 on 7.x-1.x
    Issue #2873509 by hgoto, jcnventura: Notice: Undefined index:...
jcnventura’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.