Collection seletion list in the default admin theme.

When adding or editing an item to omeka using the default admin theme, I was having a problem with the Collection selection list. It would only show 10 collections. The code to create the selection list in form.php is

<?php select('collection_id', collections(), $item->collection_id, 'Collection', 'id', 'name'); ?>

I tracked the behavior to the collections() function using print_r(collections()), which was only returning 10 items in the array. Ultimately this function calls the findBy method in the applications/models/CollectionTable.php class which seems to default to a per_page limit of 10, if a parameter is not passed.

Here's my fix.

<?php select('collection_id', collections(array('per_page'=>total_collections())), $item->collection_id, 'Collection', 'id', 'name'); ?>

Is there a more formal for submitting bugs and fixes?


Hi Garry,

There is a patch for this available that was posted to the forums and on our dev list:

To apply the patch, download the attached file and try:
patch -p0 < collections_limit.patch in the root of your installation.

If you haven't already, please feel free to join the dev list.


Thanks Sheila,

Will do.