The Views Module don't work properly with the Weight Module. I don't know, if this is an issue for the weight or the views module. Fact is, that the views module don't understand the sticky database values for filtering anymore.

Filter node-sticky in views is important to get only nodes back, which are sticky.

Comments

bitman’s picture

Status: Active » Needs review

The "Node: Sticky" filter condition is indeed broken when the weight module is enabled.

To work around this, we can introduce a new filter condition named "Weight: Sticky" that does work with the weight module. Just add this function to weight.module:

function weight_views_tables() {
  $tables['node_by_weight'] = array(
    'name' => 'node',
    'join' => array(
      'left' => array(
        'table' => 'node',
        'field' => 'nid',
      ),
      'right' => array(
        'field' => 'nid',
      ),
    ),
    'filters' => array(
      'sticky' => array(
        'name' => t('Weight: Sticky'),
        'operator' => array('>' => t('Yes'), '<=' => t('No')),
        'value' => array('#type' => 'value', '#value' => '0'),
        'help' => t('Filter by whether or not the node is set sticky.') . ' ' . t('Use "Weight: Sticky" as a replacement for "Node: Sticky" when the weight module is enabled.'),
      ),
    ),
  );

  return $tables;
}

Then clear the views cache from the Tools tab of the Views administration page to make views aware of this new feature.

Update all views that use the "Node: Sticky" filter and replace it with the "Weight: Sticky" filter.

Alternately, views/modules/views_node.inc could be patched with this version of the sticky filter to support the weight module.

nancydru’s picture

Assigned: krahe » Unassigned

If I get CVS access, I have this included.

nancydru’s picture

Status: Needs review » Patch (to be ported)
nancydru’s picture

Assigned: Unassigned » nancydru
Status: Patch (to be ported) » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.