show_element_sets option on all_element_texts causing error

HI all,

I am trying to use the show_element_sets option on the all_element_texts function as follows:

<?php echo all_element_texts('item', array('show_element_sets' => array('Item Type Elements'))); ?>

but am receiving the following error:

exception 'Omeka_Record_Exception' with message 'There is no element "", ""!' in /Users/jeriwieringa/Projects/MAMP/omeka/application/models/Mixin/ElementText.php:293
Stack trace:
#0 /Users/jeriwieringa/Projects/MAMP/omeka/application/models/Mixin/ElementText.php(214): Mixin_ElementText->getElement(NULL, NULL)
#1 [internal function]: Mixin_ElementText->getElementTexts(NULL, NULL)
#2 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Omeka/Record/AbstractRecord.php(251): call_user_func_array(Array, Array)
#3 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Omeka/Record/AbstractRecord.php(210): Omeka_Record_AbstractRecord->delegateToMixins('getElementTexts', Array)
#4 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/Metadata.php(173): Omeka_Record_AbstractRecord->__call('getElementTexts', Array)
#5 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/Metadata.php(173): Item->getElementTexts(NULL, NULL)
#6 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/Metadata.php(139): Omeka_View_Helper_Metadata->_getElementText(Object(Item), NULL, NULL)
#7 /Users/jeriwieringa/Projects/MAMP/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 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/View/Abstract.php(350): call_user_func_array(Array, Array)
#10 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/AllElementTexts.php(224): Zend_View_Abstract->__call('metadata', Array)
#11 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/AllElementTexts.php(224): Omeka_View->metadata(Object(Item), Array, Array)
#12 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/AllElementTexts.php(243): Omeka_View_Helper_AllElementTexts->_getFormattedElementTexts(Object(Item), Array)
#13 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/AllElementTexts.php(301): Omeka_View_Helper_AllElementTexts->_getOutputAsHtml()
#14 /Users/jeriwieringa/Projects/MAMP/omeka/application/views/helpers/AllElementTexts.php(94): Omeka_View_Helper_AllElementTexts->_getOutput()
#15 [internal function]: Omeka_View_Helper_AllElementTexts->allElementTexts('item', Array)
#16 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/View/Abstract.php(350): call_user_func_array(Array, Array)
#17 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/globals.php(2019): Zend_View_Abstract->__call('allElementTexts', Array)
#18 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/globals.php(2019): Omeka_View->allElementTexts('item', Array)
#19 /Users/jeriwieringa/Projects/MAMP/omeka/themes/berlin/items/show.php(7): all_element_texts('item', Array)
#20 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Omeka/View.php(117): include('/Users/jeriwier...')
#21 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/Users/jeriwier...')
#22 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(905): Zend_View_Abstract->render('items/show.php')
#23 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(926): Zend_Controller_Action_Helper_ViewRenderer->renderScript('items/show.php', NULL)
#24 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(965): Zend_Controller_Action_Helper_ViewRenderer->render()
#25 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#26 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#27 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('showAction')
#28 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#29 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#30 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Zend/Application.php(382): Zend_Application_Bootstrap_Bootstrap->run()
#31 /Users/jeriwieringa/Projects/MAMP/omeka/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#32 /Users/jeriwieringa/Projects/MAMP/omeka/index.php(23): Omeka_Application->run()
#33 {main}

Is this option still valid? Am I making an obvious mistake in usage?

Thanks!!

Does it work if you instead say "Item Type Metadata" (or, to test, "Dublin Core"), not "Item Type Elements"?

Hi John,

Somewhat curiously, it does work with "Item Type Metadata" (yay!) but does not work with "Dublin Core", which is unfortunate, as I am looking to call each of them separately.

Hi again,

Figured out the second part - We are also using the YouTube player plugin. They recently pushed a fix to display the viewer at the top, but it is creating conflicts for the all_element_texts function, as well as with the Collections Show page.

I'll push a fix up on the documentation.

Conversation about that is also happening on the Omeka dev list, so that'll be a good place to watch if you aren't already.