Method named 'fetchOrderedItems' does not exist or is not callable

The page that links to the problem page is - (Click on any image to trigger.)

I think the problem appeared when I moved the site to a new provider and executed an update to Omeka 2.5. Previous to this, the site has worked correctly for several years. Is there an update that has affected the code?

The offending code was suggested to me by patrickmj in the forum post -

The problem code is -
$orderedItems = get_db()->getTable(‘ItemOrder_ItemOrder’)->fetchOrderedItems(metadata(‘item’, ‘Collection Id’));

I am using Omeka 2.5

The problem here is going to be that the current versions of Item Order don’t have that method anymore.

Current Item Order will give you the correct ordering whenever you try to retrieve the items in the collection and don’t specify any other order. So, the current equivalent to that code would be

$orderedItems = get_records('Item', array('collection' => metadata('item', 'collection id')), 0);

Thanks, that fixed it.