Error with Curatescape TourBuilder Plugin (Class 'Tour' not found)

Hi Erin,

It seems that I’m running into trouble with the TourBuilder plugin upgrading my Omeka website. Whenever I attempt an upgrade of the plugin (1.7.1), I run into an error message that prevents it from taking place.

According to the error log, the problem seems to be that “Class ‘Tour’ not found in application/libraries/Omeka/Db/Table.php on line 682”

However, I’m not certain how exactly to resolve this problem. Could you clarify whenever you find a moment?

That’s strange. Can you send me the Omeka error message?

https://omeka.org/classic/docs/Troubleshooting/Retrieving_Error_Messages/

More questions:

  • Does this only happen when you hit the green upgrade button?
  • Are you using the Curatescape theme?
  • Do all the public and admin pages render? If not, which ones?
  • What version of PHP are you using?
  • What version of Omeka are you using?

The version of Omeka I’m using is 2.7, and the web server version of PHP is 7.2.7 (for phpMyAdmin, the version is 4.8.5). The website is using the latest Curatescape theme, and this problem only happens when I hit the green upgrade button, since all of the other public and admin pages otherwise work.

I uncommented the # sign in #SetEnv APPLICATION_ENV development, and I ended up receiving the following error message (which also came up when I clicked on the plugins section of my admin page):

This is a server error, which indicates something else is going on. An Omeka error message will generally be red and beige, sort of like the color scheme of the admin dashboard, and include a full stack trace of the error.

If SetEnv APPLICATION_ENV development doesn’t work, try adding this to the top of bootstrap.php:

define('APPLICATION_ENV', 'development');

Can you tell me the name of the Tourbuilder directory in your plugins folder? If it contains extra word, like -master, that could cause an error (though this particular one is still odd).

Maybe just re-download the plugin from here:

TourBuilder.zip :point_left:

Hi Erin,

Apologies for the delay in response – I’ve tried to re-download the plugin but I’m still running into the same error message (the name of the file in my directory is TourBuilder).

I’ve still been unable to trace the error using the bootstrap recommendation – I was able to pull up the following page automatically when I visited the admin page of my site, but I wasn’t able to navigate to the TourBuilder plugin while this message was up:

I tried different versions where I edited the htaccess file and the bootstrap file together, then separately, but I wasn’t sure if there was a problem with the way I was following these instructions.

Looks like you added the code outside of the <?php block, which is why you’re not getting a proper error message.

Looking at the most recent version of Omeka, you can actually just change the line that reads:

define('APPLICATION_ENV', $app_env);

to…

define('APPLICATION_ENV', 'development');

It worked! Here’s the full text alongside the screenshot:

exception ‘Zend_Db_Statement_Mysqli_Exception’ with message ‘Mysqli statement execute error : Duplicate column name ‘postscript_text’’ in /home/streetar/public_html/application/libraries/Zend/Db/Statement/Mysqli.php:214
Stack trace:
#0 /home/streetar/public_html/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/streetar/public_html/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query(‘ALTER TABLE om...') #3 /home/streetar/public_html/application/libraries/Omeka/Db.php(80): call_user_func_array(Array, Array) #4 /home/streetar/public_html/plugins/TourBuilder/TourBuilderPlugin.php(74): Omeka_Db->__call('query', Array) #5 /home/streetar/public_html/plugins/TourBuilder/TourBuilderPlugin.php(74): Omeka_Db->query('ALTER TABLEom…’)
#6 [internal function]: TourBuilderPlugin->hookUpgrade(Array)
#7 /home/streetar/public_html/application/libraries/Omeka/Plugin/Broker.php(142): call_user_func(Array, Array)
#8 /home/streetar/public_html/application/libraries/Omeka/Plugin/Installer.php(96): Omeka_Plugin_Broker->callHook(‘upgrade’, Array, Object(Plugin))
#9 /home/streetar/public_html/application/controllers/PluginsController.php(231): Omeka_Plugin_Installer->upgrade(Object(Plugin))
#10 /home/streetar/public_html/application/libraries/Zend/Controller/Action.php(516): PluginsController->upgradeAction()
#11 /home/streetar/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘upgradeAction’)
#12 /home/streetar/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /home/streetar/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#14 /home/streetar/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#15 /home/streetar/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#16 /home/streetar/public_html/admin/index.php(28): Omeka_Application->run()
#17 {main}

Ok, looks like you’re upgrading from a very old version of TourBuilder and we’ve had some issues with that in the past because we didn’t properly tag our early releases. Try commenting out line 74 of TourBuilderPlugin.php like so…

Change this…
$db->query($sql);
to this…
// $db->query($sql);

Hmm it looks like I’m running into a slightly different error now on this page:

Omeka has encountered an error

Zend_Db_Statement_Mysqli_Exception

Mysqli statement execute error : Can’t DROP ‘slug’; check that column/key exists

exception ‘Zend_Db_Statement_Mysqli_Exception’ with message ‘Mysqli statement execute error : Can’t DROP ‘slug’; check that column/key exists’ in /home/streetar/public_html/application/libraries/Zend/Db/Statement/Mysqli.php:214 Stack trace: #0 /home/streetar/public_html/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array) #1 /home/streetar/public_html/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array) #2 [internal function]: Zend_Db_Adapter_Abstract->query(‘ALTER TABLE om...') #3 /home/streetar/public_html/application/libraries/Omeka/Db.php(80): call_user_func_array(Array, Array) #4 /home/streetar/public_html/plugins/TourBuilder/TourBuilderPlugin.php(80): Omeka_Db->__call('query', Array) #5 /home/streetar/public_html/plugins/TourBuilder/TourBuilderPlugin.php(80): Omeka_Db->query('ALTER TABLEom…’) #6 [internal function]: TourBuilderPlugin->hookUpgrade(Array) #7 /home/streetar/public_html/application/libraries/Omeka/Plugin/Broker.php(142): call_user_func(Array, Array) #8 /home/streetar/public_html/application/libraries/Omeka/Plugin/Installer.php(96): Omeka_Plugin_Broker->callHook(‘upgrade’, Array, Object(Plugin)) #9 /home/streetar/public_html/application/controllers/PluginsController.php(231): Omeka_Plugin_Installer->upgrade(Object(Plugin)) #10 /home/streetar/public_html/application/libraries/Zend/Controller/Action.php(516): PluginsController->upgradeAction() #11 /home/streetar/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘upgradeAction’) #12 /home/streetar/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #13 /home/streetar/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch() #14 /home/streetar/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #15 /home/streetar/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run() #16 /home/streetar/public_html/admin/index.php(28): Omeka_Application->run() #17 {main}

Ok, so now you might try commenting out lines 79-80 and then if you get another error like 'Can't DROP 'tour_image'... maybe also comment out lines 82-83 (in each case by adding two slashes ( // ) at the start of the lines in question). Let me know how it goes.

Here’s the new error that shows up when I comment out the last remaining lines:

Omeka has encountered an error

RuntimeException

The configured PHP path (/bin/php) does not point to a PHP-CLI binary.

exception ‘RuntimeException’ with message ‘The configured PHP path (/bin/php) does not point to a PHP-CLI binary.’ in /home/streetar/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php:124 Stack trace: #0 /home/streetar/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(93): Omeka_Job_Process_Dispatcher::_checkCliPath(’/bin/php’) #1 /home/streetar/public_html/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath() #2 /home/streetar/public_html/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(31): Omeka_Job_Process_Dispatcher::startProcess(‘Omeka_Job_Proce…’, Object(User), Array) #3 /home/streetar/public_html/application/libraries/Omeka/Job/Dispatcher/Default.php(151): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send(’{“className”:"J…’, Array) #4 /home/streetar/public_html/plugins/TourBuilder/TourBuilderPlugin.php(87): Omeka_Job_Dispatcher_Default->sendLongRunning(‘Job_SearchTextI…’) #5 [internal function]: TourBuilderPlugin->hookUpgrade(Array) #6 /home/streetar/public_html/application/libraries/Omeka/Plugin/Broker.php(142): call_user_func(Array, Array) #7 /home/streetar/public_html/application/libraries/Omeka/Plugin/Installer.php(96): Omeka_Plugin_Broker->callHook(‘upgrade’, Array, Object(Plugin)) #8 /home/streetar/public_html/application/controllers/PluginsController.php(231): Omeka_Plugin_Installer->upgrade(Object(Plugin)) #9 /home/streetar/public_html/application/libraries/Zend/Controller/Action.php(516): PluginsController->upgradeAction() #10 /home/streetar/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘upgradeAction’) #11 /home/streetar/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #12 /home/streetar/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch() #13 /home/streetar/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run() #14 /home/streetar/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run() #15 /home/streetar/public_html/admin/index.php(28): Omeka_Application->run() #16 {main}

The plot thickens!

So this is a server-related error indicating that Omeka cannot find the correct path to the PHP command line interface, which is used to index records (I’m guessing you would also get this error if you tried to re-index items in Admin > Settings > Search, but in this case it has to do with the tour builder trying to index tours, specifically).

There’s a thread on the Omeka Forum about this issue. Depending on your server settings, you should be able to edit the file at application/config/config.ini around line 152 to read something like:

background.php.path = "/usr/local/bin/php"

If that path doesn’t work, you might need to request the path to PHP-CLI from your web hosting company or server admin.

It works!! Thanks so much for your patience and help with all of this, it’s so appreciated.

Glad you got it working! And apologies for the issues with the upgrade script. This level of tweaking shouldn’t be required going forward.

By the way: since we had to comment out some of the upgrade processes, be sure to test the functionality of Tour Builder by adding/editing a tour to make sure the database is setup properly. Just in case.

Thanks! It looks like the Tour plugin is working properly so there are no remaining issues with it.

1 Like