Error upgrading to Omeka 2.8

Hi All,
Omeka has been bugging me to upgrade to 2.8 from 2.7.1 and I tried it on my dev site. It’s good I didn’t do it on the actual site as there seems to be a javascript error that is preventing the content from rendering. It seems to be with the plugin mmenu.js and an element not being there.

Dev site (upgraded, js error appears):

Live site (old version, loads fine):

So I’m wondering if anyone has run into this problem and might have some insight to offer before I go in there and start wildly hacking at it until it renders properly.

This is a js package that came with the curatescape theme, so I will post there also. But I thought it might be a general problem people are having when upgrading Omeka.

Thanks for your help!

Your error seems to be related to a fatal error actually; you can see it in the source of your upgraded site:

Fatal error: Uncaught Error: Call to undefined function get_random_featured_collections() in /home/philippi/public_html/mapping-dev-43/themes/curatescape/custom.php:2233
Stack trace:
#0 /home/philippi/public_html/mapping-dev-43/themes/curatescape/custom.php(2664): mh_display_random_featured_collection(true, 12)
#1 /home/philippi/public_html/mapping-dev-43/themes/curatescape/index.php(119): homepage_widget_sections()
#2 /home/philippi/public_html/mapping-dev-43/application/libraries/Omeka/View.php(114): include('/home/philippi/...')
#3 /home/philippi/public_html/mapping-dev-43/application/libraries/Zend/View/Abstract.php(888): Omeka_View->_run('/home/philippi/...')
#4 /home/philippi/public_html/mapping-dev-43/application/libraries/Zend/Controller/Action/Helper/ViewRenderer.php(912): Zend_View_Abstract->render(NULL)
#5 /home/philippi/public_html/mapping-dev-43/application/controllers/IndexController.php(16): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index.php')
#6 /home/philippi/public_html/mapping-dev-43/ap in /home/philippi/public_html/mapping-dev-43/themes/curatescape/custom.php on line 2233

It seems fairly likely this is something Curatescape-specific, though it seems kind of odd to be something affected by the 2.8 upgrade: Omeka didn’t have this function it’s complaining about in 2.7, and still doesn’t in 2.8. I wonder, could this error actually be the result of a different change you were trying out on your dev site that you just noticed when checking things after trying the upgrade?

Thanks for responding!

It returns php errors randomly (and fairly rarely). I’m not sure why. I think the error above is a case of that because that function is pretty straightforward (of course, I might be wrong about that). But if you keep reloading they go away and you are left with the js error.

I thought it might be something with inconsistencies between versions, so I actually cloned the live site into a fresh version and tried the upgrade from there. And still, no dice.

Let me know if you keep getting the error. This appears when you load the index page, yes?

There’s now a different, much more visible error, though it still seems to be related to Curatescape and the display of collections specifically.

Yeah, I was trying to fix what you were saying guided by another suggestion on the curatescape forum. It’s a bit of a rabbit hole. Will let you know how it goes. But I think I am getting closer.

Thanks for looking!

Got the error finally! It had nothing to do with the mmenu.js file at all.

While customising the app, I added a function to application/libraries/globals.php in the curatescape theme folder called, you guessed it, get_random_featured_collections (note the s). But when upgrading, globals.php get rewritten during the upgrade process!!!

So don’t mess with anything outside of custom.php. Lesson learned. I also should have read the documentation rather than just hacking away as I usually do. Ugh. I’m sure I added some script somewhere else.

Ah well, at least the homepage is working now!

Thanks so much for your help!

You can close this thread…

Quick correction: it was /applications/libraries/globals.php on the root level, not in themes/curatescape/.

Thanks for updating with your resolution of the problem.

I’ll close the thread.