I have my sort criterion, my order field in fields list [not in first position], my style configured, number of elements to display set to 0 (unlimited), cache cleared...
And I style can't get it work.
The view is displaying correctly but order is not saved on submit.
When I check "Show input fields?", this input is empty on view display ( not preview!)...
Please help me, here is my view:
$view = new view;
$view->name = 'ordre_bon_plan_push';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Paramètres par défaut', 'default');
$handler->override_option('fields', array(
'nid' => array(
'label' => 'Nid',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'link_to_node' => 0,
'exclude' => 0,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'relationship' => 'none',
),
'title' => array(
'label' => 'Titre',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'field_marchand_referent_nid' => array(
'label' => 'Marchand',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_marchand_referent_nid',
'table' => 'node_data_field_marchand_referent',
'field' => 'field_marchand_referent_nid',
'relationship' => 'none',
),
'field_tri_push_value' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'link_to_node' => 0,
'label_type' => 'none',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 0,
'id' => 'field_tri_push_value',
'table' => 'node_data_field_tri_push',
'field' => 'field_tri_push_value',
'override' => array(
'button' => 'Supplanter',
),
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'field_tri_push_value' => array(
'order' => 'ASC',
'delta' => -1,
'id' => 'field_tri_push_value',
'table' => 'node_data_field_tri_push',
'field' => 'field_tri_push_value',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'field_thematiques_nid' => array(
'default_action' => 'ignore',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'Tous / Toutes',
'title' => '',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'field_thematiques_nid',
'table' => 'node_data_field_thematiques',
'field' => 'field_thematiques_nid',
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'bon_plan' => 0,
'marchand' => 0,
'newsletter_thematique' => 0,
'newsletter_top_20' => 0,
'page' => 0,
'thematique' => 0,
'top_20' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'3' => 0,
'2' => 0,
),
'validate_argument_type' => 'tid',
'user_argument_type' => '',
'restrict_user_roles' => 0,
'user_roles' => array(),
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'bon_plan' => 'bon_plan',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('title', 'Tri push thématique');
$handler->override_option('empty', 'Aucun bon plan dans cette thématique');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'draggabletable');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'nid' => 'nid',
'title' => 'title',
'field_marchand_referent_nid' => 'field_marchand_referent_nid',
'field_tri_push_value' => 'field_tri_push_value',
),
'info' => array(
'nid' => array(
'sortable' => 0,
'separator' => '',
),
'title' => array(
'sortable' => 0,
'separator' => '',
),
'field_marchand_referent_nid' => array(
'separator' => '',
),
'field_tri_push_value' => array(
'sortable' => 0,
'separator' => '',
),
),
'default' => '-1',
'tabledrag_hierarchy' => array(
'field' => 'none',
'handler' => 'native',
),
'tabledrag_order' => array(
'field' => 'field_tri_push_value',
'handler' => 'native',
),
'draggableviews_extensions' => array(
'extension_top' => '3',
'extension_bottom' => '3',
),
'tabledrag_order_visible' => array(
'visible' => 'visible',
),
'tabledrag_hierarchy_visible' => array(
'visible' => 0,
),
'draggableviews_depth_limit' => '-1',
'tabledrag_types_add' => 'Add type',
'tabledrag_expand' => array(
'expand_links' => 0,
'collapsed' => 0,
'by_uid' => 0,
),
'tabledrag_lock' => array(
'lock' => 0,
),
'draggableviews_default_on_top' => '1',
));
$handler->override_option('row_options', array(
'inline' => array(),
'separator' => '',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'push/views/tri-push-thematique');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
));
Comments
Comment #1
sevi commentedThis is a known bug (#418068: draggable view does not order) that has already been fixed at http://drupal.org/node/313081.
Use the current development snapshot. I'll release BETA5 with these changes shortly.
Greetings,
sevi
edit: wrong issue number in brackets.
Comment #2
Ocyrhoé commentedThanks Sevi