Incorrect Site Order - sortByDisplayOrder

Permalink
Morning all.
I have been having trouble with the order of things displaying incorrectly. I copied the code (below) directly from a how-to page and it still is not behaving.

Loader::model('page_list');
  $pl = new PageList();
  $pl->filterByCollectionTypeHandle('product_list');
  $pl->sortByDisplayOrder(); //'alpha_asc' Sort alphebetically   'display_asc'
  $pages = $pl->getPage();
  // Display Page Name and Description
  foreach ($pages as $page){
    echo $page->getCollectionName();
    echo $page->getCollectionDescription()."<BR><BR>";
  }


Then you can see in the attached screenie that the site map is one order and the execution of sortByDisplayOrder() displays another order. Not even sure how exactly it is ordering them.

I have seen this before but is was in the dash board where the order of the available custom attributes on the left and the active custom attributes on the right weren't jiving.

This however is less of a problem than the correct ordering of the pages with respect to site map.

Is it possible the DB got messed up somewhere along the line? If so, what is the table/row that is called to handle sitemap order?

Any ideas?
Thanks,
Chris

1 Attachment