Embed Codes - embed list and error [Solved]


#1

We are using the Embed Codes Plugin v.1 on Omeka v.2.6 and I have noticed that our “embedded items” list in the admin interface had been accumulating a lot of entries that were not actual embeds, but rather our own omeka instance.

Today when I went to investigate this further, I noticed that I now get an error message when I try to view this page. This looks similar to the error I had with social bookmarking plugin when our host was having heavy traffic, but given the previously strange behavior of this plugin I’m a bit concerned.

The error is below, any ideas?

InvalidArgumentException: Invalid record passed to recordMetadata. in /home/digital/public_html/application/views/helpers/Metadata.php:58
Stack trace:
#0 /home/digital/public_html/application/libraries/Zend/View/Abstract.php(349): Omeka_View_Helper_Metadata->metadata(NULL, Array, Array)
#1 /home/digital/public_html/application/libraries/globals.php(2041): Zend_View_Abstract->__call(‘metadata’, Array)
#2 /home/digital/public_html/plugins/EmbedCodes/views/admin/index/browse.php(31): metadata(NULL, Array)
#3 /home/digital/public_html/application/libraries/Omeka/View.php(114): include(’/home/digital/…’)
#4 /home/digital/public_html/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run(’/home/digital/…’)
#5 /home/digital/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(NULL)
#6 /home/digital/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript(‘index/browse.ph…’, NULL)
#7 /home/digital/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render()
#8 /home/digital/public_html/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#9 /home/digital/public_html/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#10 /home/digital/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘browseAction’)
#11 /home/digital/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#12 /home/digital/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#13 /home/digital/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#14 /home/digital/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#15 /home/digital/public_html/admin/index.php(28): Omeka_Application->run()
#16 {main}


#2

I figured out the issue. Since the internet is littered with unanswered posts I wanted to follow up with my specific problem. (Obligatory XKCD)

An item was deleted yesterday, but it was still present in the embed table in the database. When the following line in the browse.php for the admin interface went looking for it, it wasn’t there, hence ‘invalid metadata.’

<span class='title'><?php echo link_to($item, 'show', metadata($item, array('Dublin Core', 'Title'))); ?></span>

I deleted the relevant entries from the database table and everything is back to normal. :grin:

Now I’d love to figure out how to avoid having items from my own Omeka installation from being added to that table, and possibly have deleted items handled more gracefully…:thinking: