Error After Updating - Zend_Db_Statement

upgrade

#1

I have run into the error below and am wondering if there is someone here able to help me. I have updated my site to the most recent version from 2.3.1 and after upgrading all of the plugins except for Tour Building, I click “upgrade” and it leads me with the error below. Can anyone help? Thanks! Matt

exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : Duplicate column name 'postscript_text'' in /home/arvadahi/public_html/tour/application/libraries/Zend/Db/Statement/Mysqli.php:214
Stack trace:
#0 /home/arvadahi/public_html/tour/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/arvadahi/public_html/tour/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/arvadahi/public_html/tour/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#4 /home/arvadahi/public_html/tour/plugins/TourBuilder/TourBuilderPlugin.php(74): Omeka_Db->__call('query', Array)
#5 /home/arvadahi/public_html/tour/plugins/TourBuilder/TourBuilderPlugin.php(74): Omeka_Db->query('ALTER TABLE `om...')
#6 [internal function]: TourBuilderPlugin->hookUpgrade(Array)
#7 /home/arvadahi/public_html/tour/application/libraries/Omeka/Plugin/Broker.php(145): call_user_func(Array, Array)
#8 /home/arvadahi/public_html/tour/application/libraries/Omeka/Plugin/Installer.php(99): Omeka_Plugin_Broker->callHook('upgrade', Array, Object(Plugin))
#9 /home/arvadahi/public_html/tour/application/controllers/PluginsController.php(237): Omeka_Plugin_Installer->upgrade(Object(Plugin))
#10 /home/arvadahi/public_html/tour/application/libraries/Zend/Controller/Action.php(516): PluginsController->upgradeAction()
#11 /home/arvadahi/public_html/tour/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('upgradeAction')
#12 /home/arvadahi/public_html/tour/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /home/arvadahi/public_html/tour/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#14 /home/arvadahi/public_html/tour/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#15 /home/arvadahi/public_html/tour/application/libraries/Omeka/Application.php(77): Zend_Application->run()
#16 /home/arvadahi/public_html/tour/admin/index.php(28): Omeka_Application->run()
#17 {main}

#2

Hi @mprythero1869,

It sounds like your version of TourBuilder was older than about 1.4 and might be getting stuck on the upgrade script due to a bug. Have a look at the file TourBuilderPlugin.php. You may be able to just comment out the following lines (73-74)

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

Then run the upgrade script. That should do it.