Clicking "Image Annotations"in settings header gives error

When I go to my settings and click on "Image Annotations" in the header, I get an error "Omeka has encountered an error". The error in my log from this is follows:

2013-06-25T12:49:50-04:00 ERR (3): exception 'Exception' with message 'An item has not been set to be displayed on this theme page! Please see Omeka documentation for details.' in /prodat/omeka/omeka-1.5.3-peoplescontest/application/helpers/ItemFunctions.php:73
Stack trace:
#0 /prodat/omeka/omeka-1.5.3-peoplescontest/application/helpers/LinkFunctions.php(187): get_current_item()
#1 /prodat/omeka/omeka-1.5.3-peoplescontest/plugins/ImageAnnotation/views/admin/moderate/browse.php(31): link_to_item(NULL, Array, 'show', NULL)
#2 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Omeka/View.php(113): include('/prodat/omeka/o...')
#3 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/prodat/omeka/o...')
#4 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(900): Zend_View_Abstract->render('moderate/browse...')
#5 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(921): Zend_Controller_Action_Helper_ViewRenderer->renderScript('moderate/browse...', NULL)
#6 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(960): Zend_Controller_Action_Helper_ViewRenderer->render()
#7 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#8 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#9 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('browseAction')
#10 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#11 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#12 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#13 /prodat/omeka/omeka-1.5.3-peoplescontest/application/libraries/Omeka/Core.php(165): Zend_Application->run()
#14 /prodat/omeka/omeka-1.5.3-peoplescontest/admin/index.php(44): Omeka_Core->run()
#15 {main}

I'm using the Thanks Roy theme which I believe is the "default" theme folder on the server. I do have a folder called items in that theme on the server and have the show.php file in that folder as the directions say. What else might I be missing? I can click on the plugins tab in the settings and then on Configure for Image Annotations and that all works.

Anyone have a clue of what I could try? Any help would be much appreciated. I tried switching to another theme since the message seems to be theme related. That didn't help.

This appears to be a bug in the Image Annotation plugin. When an image has been annotated, and then the item with that image is deleted, this error happens.

A workaround is to modify the file ImageAnnotation/views/admin/moderate/browse.php the following way

On line 31, which currently looks like:

<td><?php echo link_to_item($itemForAnnotation->id, array(), 'show', $itemForAnnotation); ?></td>

comment out the php by putting // in front of the echo:

<td><?php //echo link_to_item($itemForAnnotation->id, array(), 'show', $itemForAnnotation); ?></td>

That will let the screen load, and you can delete the annotations that are still there for items that have been deleted. Once that is done, you can go back and remove the // so you will have a link to the item again.

Outstanding! Thanks for the help. This worked!