scholarslab / cville_rally_theme

Omeka theme for Charlottesville rally archive
4 stars 0 forks source link

Review codebase, add conditionals for plugin-specific code #25

Open jeremyboggs opened 5 years ago

jeremyboggs commented 5 years ago

In at least once place in the theme, we presume the Contriubtion plugin is installed. If the theme is deployed on a site that doesn't use the Contribution plugin, the site breaks.

eam5 commented 5 years ago
exception 'BadMethodCallException' with message 'Method named 'findByItem' does not exist or is not callable.' in /var/www/html/rally/application/libraries/Omeka/Db/Table.php:83
Stack trace:
#0 /var/www/html/rally/themes/cville_rally_theme/functions.php(65): Omeka_Db_Table->__call('findByItem', Array)
#1 /var/www/html/rally/themes/cville_rally_theme/functions.php(65): Omeka_Db_Table->findByItem(Object(Item))
#2 [internal function]: filter_for_anonymity('Gracie Hall', Array)
#3 /var/www/html/rally/application/libraries/Omeka/Plugin/Broker.php(266): call_user_func('filter_for_anon...', 'Gracie Hall', Array)
#4 /var/www/html/rally/application/libraries/globals.php(324): Omeka_Plugin_Broker->applyFilters(Array, 'Gracie Hall', Array)
#5 /var/www/html/rally/application/views/helpers/Metadata.php(263): apply_filters(Array, 'Gracie Hall', Array)
#6 /var/www/html/rally/application/views/helpers/Metadata.php(238): Omeka_View_Helper_Metadata->_filterText(Object(Item), Array, 'Gracie Hall', Object(ElementText))
#7 /var/www/html/rally/application/views/helpers/Metadata.php(88): Omeka_View_Helper_Metadata->_process(Object(Item), Array, Object(ElementText), false, true, true)
#8 [internal function]: Omeka_View_Helper_Metadata->metadata(Object(Item), Array, Array)
#9 /var/www/html/rally/application/libraries/Zend/View/Abstract.php(350): call_user_func_array(Array, Array)
#10 /var/www/html/rally/application/views/helpers/AllElementTexts.php(221): Zend_View_Abstract->__call('metadata', Array)
#11 /var/www/html/rally/application/views/helpers/AllElementTexts.php(221): Omeka_View->metadata(Object(Item), Array, Array)
#12 /var/www/html/rally/application/views/helpers/AllElementTexts.php(240): Omeka_View_Helper_AllElementTexts->_getFormattedElementTexts(Object(Item), Array)
#13 /var/www/html/rally/application/views/helpers/AllElementTexts.php(298): Omeka_View_Helper_AllElementTexts->_getOutputAsHtml()
#14 /var/www/html/rally/application/views/helpers/AllElementTexts.php(94): Omeka_View_Helper_AllElementTexts->_getOutput()
#15 [internal function]: Omeka_View_Helper_AllElementTexts->allElementTexts('item', Array)
#16 /var/www/html/rally/application/libraries/Zend/View/Abstract.php(350): call_user_func_array(Array, Array)
#17 /var/www/html/rally/application/libraries/globals.php(2057): Zend_View_Abstract->__call('allElementTexts', Array)
#18 /var/www/html/rally/application/libraries/globals.php(2057): Omeka_View->allElementTexts('item', Array)
#19 /var/www/html/rally/themes/cville_rally_theme/items/show.php(8): all_element_texts('item')
#20 /var/www/html/rally/application/libraries/Omeka/View.php(114): include('/var/www/html/r...')
#21 /var/www/html/rally/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/var/www/html/r...')
#22 /var/www/html/rally/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render('items/show.php')
#23 /var/www/html/rally/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript('items/show.php', NULL)
#24 /var/www/html/rally/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render()
#25 /var/www/html/rally/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#26 /var/www/html/rally/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#27 /var/www/html/rally/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('showAction')
#28 /var/www/html/rally/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#29 /var/www/html/rally/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#30 /var/www/html/rally/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#31 /var/www/html/rally/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#32 /var/www/html/rally/index.php(23): Omeka_Application->run()
#33 {main}