This looks like a possible result of the JHTML refactoring.
What is happening:
The category view reads the current sort direction variable from the request and will output the opposite. This opposite value is passed to JHTML::grid.sort. Grid.sort takes this value and outputs the opposite. Two opposites will result in the same output value.
Where to look in the code to fix it:
components/com_content/views/category/view.html.php _buildSortLists():
Code:
if ($filter_order_Dir == 'DESC') {
$lists['order_Dir'] = 'ASC';
} else {
$lists['order_Dir'] = 'DESC';
}
libraries/joomla/html/html/grid.php sort():
Code:
$direction = strtolower( $direction );
$images = array( 'sort_asc.png', 'sort_desc.png' );
$index = intval( $direction == 'desc' );
$direction = ($direction == 'desc') ? 'asc' : 'desc';
?>
<a href="javascript:tableOrdering('<?php echo $order; ?>','<?php echo $direction; ?>','<?php echo $task; ?>');" title="<?php echo JText::_( 'Click to sort this column' ); ?>">
<?php
echo JText::_( $title );
if ($order == $selected ) {
echo JHTML::_('image.administrator', $images[$index], '/images/', NULL, NULL, '', '', 1 );
}
echo '</a>';
We have to do it in one place or the other - can't do both. There is an API decision involved here so I will let the dev.wg. decide how to fix it - it should be trivial for them. I would guess they would change the components so that the API doesn't change, but then again, this might be a place to break the beta2 api because it might fall in line with the old api better. I dunno.
Is this limited to only the one view? Or is it all views?
Ian