* Current commerce_shipping dev
* create view that contains line items (in my case an order view that relates line items)
* set filter on shipping service and select one arbitrary value

result:
* :-) view seems to work
* :-( saving the view is blocked and shows message "No valid values found on filter: Commerce Line item: Shipping service"

daring to raise prio as this is a views integration showstopper

Comments

geek-merlin’s picture

Title: "No valid values found on filter: Commerce Line item: Shipping service" (only when saving view) » Saving a view is blocked: "No valid values found on filter: Commerce Line item: Shipping service"
geek-merlin’s picture

geek-merlin’s picture

note:

* so this is about the filter for the 'commerce_shipping_service' field declared in commerce_shipping_line_item_configuration() and using core 'list_text'.

debugging views-save shows:
* 5x the validation call succeeds(!)
* 1x (the last) it fails

the evil call chain (where this->value == array() in views_handler_filter_in_operator::validate() )
* view::validate() - views/includes/view.inc:2057
* views_plugin_display::validate() - views/plugins/views_plugin_display.inc:2729 (the default display: views_plugin_display_default)
* views_handler_filter_in_operator::validate()

wtf?

Yes,
* ther IS an option selected
* this IS the default display

And NO,
* this is not reproducible with core text_list field on a node.
* nothing strange in syslog.
* stable or dev views all the same

geek-merlin’s picture

Project: Views (for Drupal 7) » Commerce Shipping
Version: 7.x-3.x-dev » 7.x-2.x-dev

GEE, in the offending instance of views_handler_filter_in_operator,
* $this->value ==array() :-(
* but $this->options['value'] == array(...)
looks we did not pass $this->init()!

EDIT: not necessarily, as handlers are cached.

geek-merlin’s picture

WTF? mocking this gives us a completely well-behaved filter with correct $this->value
so where can this break?

//$v=views_get_view('collmex_cmxabo');
ctools_include('object-cache');
$v=ctools_object_cache_get('view', 'collmex_cmxabo');

$v->init_display();
$d=$v->display['default']->handler;
$filter=$d->get_handlers('filter')['commerce_shipping_service_value'];
$filter->get_value_options();
dsm($filter);

hmm, as handlers are cached in the views object, the filter value must have been deleted before.

geek-merlin’s picture

Project: Commerce Shipping » Views (for Drupal 7)
Version: 7.x-2.x-dev » 7.x-3.x-dev

As the shipping service field just uses a 'list_text' field with a custom options callback, i believe this is a views issue.
A nasty one.

maxchock’s picture

Project: Commerce Shipping » Views (for Drupal 7)
Version: 7.x-2.x-dev » 7.x-3.x-dev

Any updates on this? I'm also stuck in the same situation.