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?
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).
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.
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);
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.
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.
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.