Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hughworm’s picture

I've re-rolled the patch from #64 of https://www.drupal.org/node/1177882 for 7.x-3.8, attached.

Status: Needs review » Needs work
hughworm’s picture

Having another crack at that re-rolled patch.

filipes’s picture

This patch solved my problems.
Thanks!

How can I appeal for this patch to be included into Views module, so it will also be available after the Views update?

-Mania-’s picture

My error did not disappear with the patch.

smallcoder’s picture

Thank you Hugh - my life and sanity have now been saved by your patch. I was starting to think Views was *gasp* not as amazing as everyone believes.

Still - it is daft this hasn't been committed as of yet?

Alan D.’s picture

Status: Needs work » Needs review

Just running the tests.

Some trailing whitespaces in the patch. Set your IDE to trim these on save :)

Status: Needs review » Needs work
rbrownell’s picture

Status: Needs work » Active

After patching I still had this issue.

hughworm’s picture

Alan, have any idea why the patch is failing testing? It seems to work for myself and others.

rbrownell, can you elaborate at all?

Status: Active » Needs review
Alan D.’s picture

@hughworm
That looks like an issue with the testing system. Re-queued.

[edit]
Sorry, no idea why this is doing this!

BTW, a code search finds about 40 all and 40 All in the code base ('all' and 'All'). I found trying to fix singular errors started to peculate additional bugs into other areas. I ended up hacking it by setting the correct $_GET parameter using hook_init() for the view that was having issues.

Status: Needs review » Needs work
Rob230’s picture

I tried the patch in #3. It didn't fix it for me.

I got it working by using Alan D's hook_init() code which sets it to 'All' if it hasn't been set.

hughworm’s picture

For what it's worth I think reason the patches fail testing is an issue in run-tests.sh. See https://www.drupal.org/node/2347827

demian1111’s picture

...

demian1111’s picture

Don't know if this will help anyone...
but I was using group filters and had an extra BLANK field under my defined filters. Once I deleted the empty field the error went away.

luizsgpetri’s picture

I had the same issue and created the following workaround. (Assume favorite as your filter name inside $parameters)

  // Avoid An illegal choice error.
    $parameters = drupal_get_query_parameters();
    $options = array(
      'favorited' => t('Favorited'),
      'unfavorited' => t('Unfavorited'),
    );
    // Ensure that $value is a valid option.
    if (isset($parameters['favorite']) && array_key_exists($parameters['favorite'], $options)) {
      $value = $parameters['favorite'];
    }
    else {
      $value = '';
    }

    $form['value'] = array(
      '#type' => 'select',
      '#title' => t('Favorite'),
      '#value' => $value,
      '#options' => $options,
    );
mpgeek’s picture

This is nearly necessary for #2578785: Large-scale location mapping in Drupal 8 (Views) if you want exposed filters on Leaflet GeoJSON views; adding as related. I don't yet know if this is even an issue in D8.

MustangGB’s picture

MustangGB’s picture

Status: Needs work » Closed (duplicate)