TourBuilder Error after Omeka and Curatescape updates

I recently updated both Omeka and Curatescape that runs Amhersthistoric.org that I host over at Reclaim Hosting. I have been working with them to figure out some of the issues after the update, but we still cannot get the TourBuilder to function correctly.

My partners in town at the Historical Commission would like to reorder one of the tours, but when we try to do so we can an error “Omeka encountered an error” when we try to save with the new changed order. I also cannot create a new tour. I tried to downgrade the PHP to 7.3 or 7.2, but that did not change anything. I’m back to 7.4.

Omeka version is 2.7.1
Curatescape Theme 3.4.3
TourBuilder Plugin 1.7.2

Hi @jonberndt, first please check to see if you’ve completed the update by going to admin/plugins. If you see a green button that says “Upgrade,” go ahead and do that. If not, you’ll need to enable error reporting on your server by editing the .htaccess file.

Remove the hash (#) from this line to enable development mode:

# SetEnv APPLICATION_ENV development

Save changes and try again to reproduce the error. You should get a detailed error message.

Thanks Erin,

Here is the error code:
Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: Unknown column ‘postscript_text’ in ‘field list’ in /home/amhersth/public_html/application/libraries/Zend/Db/Statement/Mysqli.php:77
Stack trace:
#0 /home/amhersth/public_html/application/libraries/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare(‘INSERT INTO om...') #1 /home/amhersth/public_html/application/libraries/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'INSERT INTO om…’)
#2 /home/amhersth/public_html/application/libraries/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare(‘INSERT INTO om...') #3 /home/amhersth/public_html/application/libraries/Omeka/Db.php(80): Zend_Db_Adapter_Abstract->query('INSERT INTO om…’, Array)
#4 /home/amhersth/public_html/application/libraries/Omeka/Db.php(257): Omeka_Db->__call(‘query’, Array)
#5 /home/amhersth/public_html/application/libraries/Omeka/Record/AbstractRecord.php(541): Omeka_Db->insert(‘omek_tours’, Array)
#6 /home/amhersth/public_html/application/libraries/Omeka/Controller/AbstractActionController.php(229): Omeka_Record_AbstractRecord->save(false)
#7 /home/amhersth/public_html/application/libraries/Zend/Controller/Action.php(516): Omeka_Controller_AbstractActionController->editAction()
#8 /home/amhersth/public_html/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(‘editAction’)
#9 /home/amhersth/public_html/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#10 /home/amhersth/public_html/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#11 /home/amhersth/public_html/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#12 /home/amhersth/public_html/application/libraries/Omeka/Application.php(73): Zend_Application->run()
#13 /home/amhersth/public_html/admin/index.php(28): Omeka_Application->run()
#14 {main}

Also, I did activate the TourBuilder plugin after updating. Here’s what that looks like. I’ve been afraid of uninstalling and then reinstalling that plugin, since I figure it would remove our tours completely. Not that big a deal with just two tours to rebuild, but I wanted to avoid if possible.

It seems you don’t have the postscript_text column in your Tour database. Based on this old forum post, it seems you’ve had this issue since 2018! This originally happened due to some bad version control in the plugin that has since been addressed. However, if your previous version was one of the ones affected by the bug (and it appears it was), it can be a little tricky to fix.

Option 1: MYSQL

If you’re comfortable with MYSQL, you can just add the required column manually, e.g.:

ALTER TABLE `Tour` ADD COLUMN `postscript_text` text collate utf8_unicode_ci default NULL

Option 2: PHP

If you’re more comfortable editing PHP, you can modify some plugin files. In the code below, from TourBuilderPlugin.php, just change ($oldVersion < '1.4') to (true).

if ($oldVersion < '1.4') {     
      $sql = "ALTER TABLE `$db->Tour` ADD COLUMN `postscript_text` text collate utf8_unicode_ci default NULL";
      $db->query($sql);   	        
}

… so it looks like this:

if (true) {     
      $sql = "ALTER TABLE `$db->Tour` ADD COLUMN `postscript_text` text collate utf8_unicode_ci default NULL";
      $db->query($sql);   	        
}

Then change the version number in plugin.ini to 1.7.21

After saving those changes, you’ll get that green “Upgrade” button again at admin/plugins. Pressing that will run the plugin upgrade hook, which should add the column to your database

Option 3: Start Over

If all else fails, you could just uninstall the plugin (which will erase your two tours, but not the items/stories they contain) and reinstall, then recreate the two tours from scratch. This is by far the easiest and least error prone option. Make sure to make a copy of your text and a list of the items/stories in your tour first.

Sorry about this issue. As I mentioned, it was an old problem that has been fixed for all the versions except, of course, the one you were previously using.

Thank you Erin, I will go with option 3 so that the error is completely removed. I’ll let you know here if that didn’t work, but I’m sure it will fix the issue.