COinS conflicting with "Browse collections"

Hi all,

I’m working on getting a site up (at http://projectdaps.org/) and I’m encountering an issue. This is my first time working on a self-hosted Omeka site, rather than omeka.net, so I’m still feeling my way through this.

Which is to say: this is likely a stupid question, and I apologize in advance. :slight_smile:

When I have the COinS plugin activated, clicking on “Browse Collections” gives me the following error message:

exception ‘Omeka_View_Exception’ with message ‘A current item variable has not been set to this view.’ in /home/projectd/public_html/application/views/helpers/GetCurrentRecord.php:27
Stack trace:
#0 [internal function]: Omeka_View_Helper_GetCurrentRecord->getCurrentRecord(‘item’, true)
#1 /home/projectd/public_html/application/libraries/Zend/View/Abstract.php(350): call_user_func_array(Array, Array)
#2 /home/projectd/public_html/application/libraries/globals.php(1854): Zend_View_Abstract->__call(‘getCurrentRecor…’, Array)
#3 /home/projectd/public_html/application/libraries/globals.php(1854): Omeka_View->getCurrentRecord(‘item’, true)
#4 /home/projectd/public_html/plugins/Coins/CoinsPlugin.php(44): get_current_record(‘item’)
#5 [internal function]: CoinsPlugin->hookPublicItemsBrowseEach(Array)
#6 /home/projectd/public_html/application/libraries/Omeka/Plugin/Broker.php(157): call_user_func(Array, Array)
#7 /home/projectd/public_html/application/libraries/globals.php(188): Omeka_Plugin_Broker->callHook(‘public_items_br…’, Array)
#8 /home/projectd/public_html/themes/PDAPS/collections/browse.php(46): fire_plugin_hook(‘public_items_br…’, Array)
#9 /home/projectd/public_html/application/libraries/Omeka/View.php(117): include(’/home/projectd/…’)
#10 /home/projectd/public_html/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run(’/home/projectd/…’)
#11 /home/projectd/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(‘collections/bro…’)
#12 /home/projectd/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(933): Zend_Controller_Action_Helper_ViewRenderer->renderScript(‘collections/bro…’, NULL)
#13 /home/projectd/public_html/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(972): Zend_Controller_Action_Helper_ViewRenderer->render()
#14 /home/projectd/public_html/application/libraries/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#15 /home/projectd/public_html/application/libraries/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#16 /home/projectd/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘browseAction’)
#17 /home/projectd/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#18 /home/projectd/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#19 /home/projectd/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#20 /home/projectd/public_html/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#21 /home/projectd/public_html/index.php(23): Omeka_Application->run()
#22 {main}

I’ve figured out that turning COinS off makes “browse collections” work fine, but I’m having trouble figuring out what to do to make COinS play well with the site.

Any advice or guidance?

What versions of the core, COinS and Exhibit Builder are you running?

D’oh! I totally forgot to mention. Sorry.

Omeka 2.4.1, COinS 2.0.3, ExhibitBuilder 3.3.2

Do you have a custom “browse exhibits” view in your theme?

Perhaps you started it as a copy of another view like items browse and kept a fire_plugin_hook call from the original.

I’m… not sure. Where would I find it if that were the case?

I’m using Interactive Mechanics’ starter Omeka theme (https://github.com/InteractiveMechanics/Omeka-Starter-Theme), and it’s basically 99% out-of-the-box at the moment (I made a couple small changes to the header and footer, but other than that, I haven’t futzed around with it much, yet.)

Okay.

First, are you sure it’s the Exhibits page that’s the problem and not the Collections page? The error message you posted is one from the the Collections page (look at the line starting #8 to see that).

It does look like there’s a bug in the theme you’re using on that page, though. Look at this line in the file collections/browse.php. Notice how it says public_items_browse_each, but otherwise is talking about collections? That string should instead be public_collections_browse_each

It was the “browse collections” page, as I said in the subject header, and not the “brows exhibits” page as I stated in the text of the original post. Sorry, that was a really dumb error on my part. When I typed the original post, it was a little chaotic. Correcting. :slight_smile:

Aaaaaannnnd… that completely fixed the problem!

Thank you so much! You just saved me HOURS!