Autonav problems after updating to 5.4.0.2

Permalink
Hi all

I've got a couple of problems with autonav on 5.4.0.2. I've hardcoded an autonav block into my theme using this code:

$bt_main = BlockType::getByHandle('autonav');
$bt_main->controller->displayPages = 'custom';
$bt_main->controller->orderBy = 'display_desc';
$bt_main->controller->displaySubPages = 'none';
$bt_main->controller->displayPagesCID = '1';
$bt_main->render('view');


which did work, but is now not sorting the items alphabetically.

I've also got a sitemap page, which is supposed to show *everything*, but it's now not showing those pages which have the 'Exclude from nav' attribute set. I am using a custom template to get round that, but it has stopped working. Here it is:

defined('C5_EXECUTE') or die(_("Access Denied."));
   $aBlocks = $controller->generateNav();
   $c = Page::getCurrentPage();
   echo("<ul class=\"nav\">");
   $nh = Loader::helper('navigation');
   //this will create an array of parent cIDs 
   $inspectC=$c;
   $selectedPathCIDs=array( $inspectC->getCollectionID() );
   $parentCIDnotZero=true;   
   while($parentCIDnotZero){
      $cParentID=$inspectC->cParentID;
      if(!intval($cParentID)){
         $parentCIDnotZero=false;
      }else{
         $selectedPathCIDs[]=$cParentID;


Any thoughts?

melat0nin
 
andrew replied on at Permalink Reply
andrew
We are having a number of issues with the autonav block. To fix this issue (and we'll be including this fix ourselves) remove this line from new blocks/autonav/controller.php file:

if (isset($columns['AK_EXCLUDE_NAV'])) {
$pl->filter(false, '(ak_exclude_nav = 0 or ak_exclude_nav is null)');
}