Greetings,

It doesn't work with Reference Option Limit module.

Any chance to support that module?

Comments

david_garcia’s picture

Status: Active » Postponed (maintainer needs more info)

Please, follow the basic bug reporting guidelines:

https://drupal.org/contribute/testing

It is very difficult to trim down the problem with the provided information. Be specific, and provide tools and steps to replicate the issue.

mas0h’s picture

I'm sorry for the short report, anyway here is the story:
I'm using reference option limit module to control the value of term reference field by another term reference field.
As described in the module description, I have three fields in chain ( Country, City, Region).

Values of "City" are controlled by the choice made in "Country", and values of "Region" are controlled by the choice made in "City". All three fields are exposed as filters in a view, so the sequence is like this:

A user chooses an option from the "country" dropdown list, then an Ajax request is being made, and only cities related to the selected country exist in the city list.

Then the user chooses a city and this will make the same request to populate the related regions of the selected city to the "region" dropdown list.

I followed your instructions and patched views 3.7 and added the selective "country field", and the list of Countries are now trimmed to the actual used terms, now this is fine, but when I choose a country I get these error messages:

Location	http://mysite.com/en/system/ajax
Message	Invalid form POST data.
Severity	warning
Location	http://mysite.com/en/system/ajax
Message	Notice: Undefined index: form_build_id in ajax_get_form() (line 321 of /path/to/mysite/includes/ajax.inc).
Severity	notice

Even though I can't add selective City and/or Region filters because they break the option limit part.

david_garcia’s picture

Asides from the bug, ¿do you really need the Reference Option Limit module? I mean, if the three filters where selective, changing one of them will actually affect and refresh the contents of the other two. You can use Better Exposed Filter to automatically trigger that refresh.

I am intrigued by the "Invalid Form POST data" warning, ¿can you get a request dump using Fiddler of what data is being POSTed?

Greetings,

mas0h’s picture

Yep, Reference option limit is a must for my website, it is different than "Better exposed filter module".
It hide all options of the controlled fields until a choice has been selected within the controller field.

As for fiddler, I have never used that before and I don't know how to use it. but if you want me to do it I will.

mas0h’s picture

I tried to use fiddler but I didn't know how to do it.

mas0h’s picture

Greetings,

I have now the dump of the POST request, how can I send it to you?
I don't want to expose my website data in public.

Thanks!

nsciacca’s picture

Version: » 7.x-1.1

I ran into a similar issue without using the Reference Option Limit, but it was unrelated to this module. When ajaxing form elements inside the Views Exposed Filters there are some important form elements like the build_id & token that are not passed along. You can find more information and a patch/workaround here - Ajax attached to exposed filters in form_alter doesn't trigger callback