Reordering view reverses order or nodes being weight ordered

toddgee - September 30, 2009 - 00:55
Project:Weight
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I am running Drupal 6.x (tag DRUPAL-6) with the most recent tags of views and weights (tag DRUPAL-6--1). Everything is up-to-date.

I set up a view to do reordering of particular nodes (matching a filter) of a particular content type ('blog_items'). I followed the directions in the README. I set the sort order of the page view to 'weight, descending' as per the instructions.

However, when I bring up the view, reorder the items, and save the results, it always reverses the order of my desired intent.

I have tried sorting the view by weight both ascending and descending but it seems to make no differnce. If I make a change and save, the page refreshes with the order reversed of what I had set it to.

I'm not sure if this is a bug or a misconfiguration on my part; but I couldn't imagine what I could try differently.

$view = new view;
$view->name = 'practice_areas_reorder_pages';
$view->description = 'Pages that use weight module to reorder the posts on the practices areas pages';
$view->tag = 'blog';
$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', 'Defaults', 'default');
$handler->override_option('fields', array(
'title' => 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,
'strip_tags' => 0,
'html' => 0,
),
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'relationship' => 'none',
),
'weight' => array(
'label' => 'Weight',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'strip_tags' => 0,
'html' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'set_precision' => FALSE,
'precision' => 0,
'decimal' => '.',
'separator' => ',',
'prefix' => '',
'suffix' => '',
'exclude' => 0,
'id' => 'weight',
'table' => 'node_weight',
'field' => 'weight',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'weight' => array(
'order' => 'ASC',
'id' => 'weight',
'table' => 'node_weight',
'field' => 'weight',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status_extra' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status_extra',
'table' => 'node',
'field' => 'status_extra',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'blog_item' => 'blog_item',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'role',
'role' => array(
'3' => 3,
'6' => 6,
),
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 0);
$handler->override_option('use_pager', '0');
$handler->override_option('style_plugin', 'weight');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'title' => 'title',
'weight' => 'weight',
),
'info' => array(
'title' => array(
'sortable' => 1,
'separator' => '',
),
'weight' => array(
'sortable' => 1,
'separator' => '',
),
),
'default' => 'weight',
));
$handler->override_option('row_options', array(
'inline' => array(
'title' => 'title',
'created' => 'created',
),
'separator' => '-',
));
$handler = $view->new_display('page', 'Cyclists reorder', 'page_1');
$handler->override_option('filters', array(
'status_extra' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status_extra',
'table' => 'node',
'field' => 'status_extra',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'blog_item' => 'blog_item',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'tid' => array(
'operator' => 'or',
'value' => array(
'336' => '336',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'type' => 'select',
'limit' => TRUE,
'vid' => '8',
'id' => 'tid',
'table' => 'term_node',
'field' => 'tid',
'hierarchy' => 0,
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
));
$handler->override_option('path', 'practice/cyclists/reorder');
$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,
));

 
 

Drupal is a registered trademark of Dries Buytaert.