I don’t know of a way to do that globally. Those base classes sometimes are overriden in specific modules. And some times, they call the parent class, other times they just replicate the code in the override, and don’t call the parent. That might explain why your change isn’t taking effect sometimes…
Try this. basically it may can work only if there is NO OTHER order by field is set.you can give it a try after clearing search filters and all filters for a module
If you want to respect user preferences then use the following code:
public function preDisplay()
{
$userPreferenceOrder = $GLOBALS['current_user']->getPreference('listviewOrder', 'AOK_KnowledgeBase2_AOK_KNOWLEDGEBASE'); // you can get required category name from "user_preferences" table.
if(empty($userPreferenceOrder['orderBy']))
{
$_REQUEST['orderBy'] = 'field_name';
$_REQUEST['sortOrder'] = 'DESC';
}
parent::preDisplay();
}