Item Errors

Hello,

I recently installed a plugin on my Omeka site called Hide Elements, and when I tried to access the items I had already listed on it, I got an error message. I deleted them and created a new one as a test (to see if it was maybe not conforming with the plugin). Still te same error message. After following the prompts in my command line to access the error message code in my browser, I saw that it said Omeka_Record_Exception
There is no element "Item Type Metadata", "Player"!

I removed the plugin to see if that was the problem, deleted my dummy item, and created a new one to see if that would work. Still the same result. What should I do?

There should be a traceback listing a bunch of code lines that follows what you posted of the error. That should contain a line or lines referring to the plugin that's causing the problem.

Since it's talking about the "Player" element, my initial guess is that this is related to the YouTube Import plugin.

Is this what you're referring to when you say traceback?

exception 'Omeka_Record_Exception' with message 'There is no element "Item Type Metadata", "Player"!' in /var/www/html/Omeka/application/models/Mixin/ElementText.php:293
Stack trace:
#0 /var/www/html/Omeka/application/models/Mixin/ElementText.php(214): Mixin_ElementText->getElement('Item Type Metad...', 'Player')
#1 [internal function]: Mixin_ElementText->getElementTexts('Item Type Metad...', 'Player')
#2 /var/www/html/Omeka/application/libraries/Omeka/Record/AbstractRecord.php(251): call_user_func_array(Array, Array)
#3 /var/www/html/Omeka/application/libraries/Omeka/Record/AbstractRecord.php(210): Omeka_Record_AbstractRecord->delegateToMixins('getElementTexts', Array)
#4 /var/www/html/Omeka/application/views/helpers/Metadata.php(173): Omeka_Record_AbstractRecord->__call('getElementTexts', Array)
#5 /var/www/html/Omeka/application/views/helpers/Metadata.php(173): Item->getElementTexts('Item Type Metad...', 'Player')
#6 /var/www/html/Omeka/application/views/helpers/Metadata.php(139): Omeka_View_Helper_Metadata->_getElementText(Object(Item), 'Item Type Metad...', 'Player')
#7 /var/www/html/Omeka/application/views/helpers/Metadata.php(70): Omeka_View_Helper_Metadata->_getText(Object(Item), Array)
#8 [internal function]: Omeka_View_Helper_Metadata->metadata(Object(Item), Array, Array)
#9 /var/www/html/Omeka/application/libraries/Zend/View/Abstract.php(350): call_user_func_array(Array, Array)
#10 /var/www/html/Omeka/application/libraries/globals.php(2004): Zend_View_Abstract->__call('metadata', Array)
#11 /var/www/html/Omeka/application/libraries/globals.php(2004): Omeka_View->metadata(Object(Item), Array, Array)
#12 /var/www/html/Omeka/plugins/YouTubeImport/YouTubeImportPlugin.php(56): metadata(Object(Item), Array)
#13 [internal function]: YouTubeImportPlugin->filterDisplayElements(Array)
#14 /var/www/html/Omeka/application/libraries/Omeka/Plugin/Broker.php(273): call_user_func(Array, Array)
#15 /var/www/html/Omeka/application/libraries/globals.php(324): Omeka_Plugin_Broker->applyFilters('display_element...', Array, Array)
#16 /var/www/html/Omeka/application/views/helpers/AllElementTexts.php(160): apply_filters('display_element...', Array)
#17 /var/www/html/Omeka/application/views/helpers/AllElementTexts.php(235): Omeka_View_Helper_AllElementTexts->_getElementsBySet()
#18 /var/www/html/Omeka/application/views/helpers/AllElementTexts.php(301): Omeka_View_Helper_AllElementTexts->_getOutputAsHtml()
#19 /var/www/html/Omeka/application/views/helpers/AllElementTexts.php(94): Omeka_View_Helper_AllElementTexts->_getOutput()
#20 [internal function]: Omeka_View_Helper_AllElementTexts->allElementTexts('item', Array)
#21 /var/www/html/Omeka/application/libraries/Zend/View/Abstract.php(350): call_user_func_array(Array, Array)
#22 /var/www/html/Omeka/application/libraries/globals.php(2019): Zend_View_Abstract->__call('allElementTexts', Array)
#23 /var/www/html/Omeka/application/libraries/globals.php(2019): Omeka_View->allElementTexts('item', Array)
#24 /var/www/html/Omeka/admin/themes/default/items/show.php(22): all_element_texts('item')
#25 /var/www/html/Omeka/application/libraries/Omeka/View.php(117): include('/var/www/html/O...')
#26 /var/www/html/Omeka/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/var/www/html/O...')
#27 /var/www/html/Omeka/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(905): Zend_View_Abstract->render('items/show.php')
#28 /var/www/html/Omeka/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(926): Zend_Controller_Action_Helper_ViewRenderer->renderScript('items/show.php', NULL)
#29 /var/www/html/Omeka/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(965): Zend_Controller_Action_Helper_ViewRenderer->render()
#30 /var/www/html/Omeka/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#31 /var/www/html/Omeka/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#32 /var/www/html/Omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('showAction')
#33 /var/www/html/Omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#34 /var/www/html/Omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#35 /var/www/html/Omeka/application/libraries/Zend/Application.php(382): Zend_Application_Bootstrap_Bootstrap->run()
#36 /var/www/html/Omeka/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#37 /var/www/html/Omeka/admin/index.php(28): Omeka_Application->run()
#38 {main}

#0 /var/www/html/Omeka/application/models/Mixin/ElementText.php(214): Mixin_ElementText->getElement('Item Type Metad...', 'Player')

If I were to type >getElement('Item Type Metadata', 'Player') in the command line of ElementText.php and save it, would thatresolve the issue?

That is the trace I mentioned.

It confirms that you're having an issue with the YouTube Import plugin, not Hide Elements. You can confirm this by deactivating or uninstalling YouTube Import and seeing if that resolves the problem.

Uninstalling and reinstalling the YouTube Import plugin may also just fix the problem going forward. For whatever reason (perhaps you deleted it yourself?), you seem to be missing the "Player" element that plugin adds and works with. Uninstalling and reinstalling that plugin may re-create the necessary element.

I uninstalled it from Omeka, and it resolved the issue. But to uninstall it from my server so I can reinstall it properly, I can't find the particular command in Omeka's help section. Is it sudo -R YouTubeImport?

I found it. Thank you for your help!